質問編集履歴
2
コード変更
test
CHANGED
File without changes
|
test
CHANGED
@@ -20,7 +20,9 @@
|
|
20
20
|
|
21
21
|
```php
|
22
22
|
|
23
|
+
public function searchroute(Request $request)
|
24
|
+
|
23
|
-
|
25
|
+
{
|
24
26
|
|
25
27
|
if ($request->get('search'))
|
26
28
|
|
1
Functionのコードを追加しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -18,15 +18,81 @@
|
|
18
18
|
|
19
19
|
|
20
20
|
|
21
|
-
|
21
|
+
```php
|
22
22
|
|
23
|
-
|
23
|
+
```
|
24
24
|
|
25
|
-
|
25
|
+
if ($request->get('search'))
|
26
26
|
|
27
27
|
{
|
28
28
|
|
29
|
+
$year=$request->get('year');
|
29
30
|
|
31
|
+
$month=$request->get('month');
|
32
|
+
|
33
|
+
$years = $year.$month;
|
34
|
+
|
35
|
+
$opname = $request->get('op_name');
|
36
|
+
|
37
|
+
$account_code = $request->get('account_code');
|
38
|
+
|
39
|
+
$item_name = $request->get('item_name');
|
40
|
+
|
41
|
+
$customer_name = $request->get('customer_name');
|
42
|
+
|
43
|
+
$depreciation = $request->get('depreciation');
|
44
|
+
|
45
|
+
$achievement = $request->get('achievement');
|
46
|
+
|
47
|
+
$concatenation = $request->get('concatenation');
|
48
|
+
|
49
|
+
$collection = $request->get('collection');
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
$search = DB::table('contents')->select()->join('contents_detail','contents_detail.ctnts_code',"=","contents.ctnts_code")
|
54
|
+
|
55
|
+
->where('contents_detail.target_date',$years)
|
56
|
+
|
57
|
+
->where('contents.op_name','like','%'.$opname.'%')
|
58
|
+
|
59
|
+
->where('contents.acnt_code','like','%'.$account_code.'%')
|
60
|
+
|
61
|
+
->where('contents.item_name','like','%'.$item_name.'%')
|
62
|
+
|
63
|
+
->where('contents.customer_name','like','%'.$customer_name.'%')
|
64
|
+
|
65
|
+
->whereIn('contents_detail.dprctn_kbn',$depreciation)
|
66
|
+
|
67
|
+
->whereIn('contents_detail.achieve_kbn',$achievement)
|
68
|
+
|
69
|
+
->whereIn('contents_detail.conct_kbn',$concatenation)
|
70
|
+
|
71
|
+
->Paginate(15);
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
return view('contents.contentssearch')
|
76
|
+
|
77
|
+
->with(['search'=>$search,'year'=>$year,'month'=>$month,'depreciation'=>$depreciation,'achievement'
|
78
|
+
|
79
|
+
=>$achievement,'concatenation'=>$concatenation]);
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
}
|
84
|
+
|
85
|
+
elseif ($request->get('downloadcsv'))
|
86
|
+
|
87
|
+
{
|
88
|
+
|
89
|
+
echo "test";
|
90
|
+
|
91
|
+
}
|
92
|
+
|
93
|
+
}
|
94
|
+
|
95
|
+
```
|
30
96
|
|
31
97
|
|
32
98
|
|