回答編集履歴

1

修正

2021/01/04 05:50

投稿

phper.k
phper.k

スコア3923

test CHANGED
@@ -1,23 +1,21 @@
1
1
  ```php
2
2
 
3
- DB::table('table')->where(function (Builder $builder) use ($start_date, $end_date) {
3
+ \DB::table('table')->where(function (Builder $builder) use ($start_date, $end_date) {
4
4
 
5
- $builder->where(function (Builder $builder) use ($start_date, $end_date) {
5
+ $builder->where(function (Builder $builder) use ($start_date, $end_date) {
6
6
 
7
- $builder->whereDate('start_date', '<=', $start_date)
7
+ $builder->whereDate('start_date', '<=', $start_date)
8
8
 
9
- ->whereDate('end_date', '>=', $end_date);
9
+ ->whereDate('end_date', '>=', $end_date);
10
10
 
11
- })->orWhere(function (Builder $builder) use ($start_date, $end_date) {
11
+ })->orWhere(function (Builder $builder) use ($start_date, $end_date) {
12
12
 
13
- $builder->whereDate('start_date', '>=', $start_date)
13
+ $builder->whereDate('start_date', '>=', $start_date)
14
14
 
15
- ->whereDate('end_date', '<>>=', $end_date);
15
+ ->whereDate('end_date', '<>>=', $end_date);
16
16
 
17
- });
17
+ });
18
18
 
19
- })
20
-
21
- ->get();
19
+ })->get();
22
20
 
23
21
  ```