質問編集履歴
4
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -68,6 +68,8 @@
|
|
68
68
|
|
69
69
|
use Auth;
|
70
70
|
|
71
|
+
use Session;
|
72
|
+
|
71
73
|
.
|
72
74
|
|
73
75
|
.
|
@@ -90,11 +92,15 @@
|
|
90
92
|
|
91
93
|
|
92
94
|
|
93
|
-
if(
|
95
|
+
if(Session::has('key')==true){
|
94
96
|
|
95
|
-
$key=
|
97
|
+
$key= Session::get('key');
|
96
98
|
|
97
|
-
}
|
99
|
+
}
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
dd($key);
|
98
104
|
|
99
105
|
|
100
106
|
|
3
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -57,6 +57,24 @@
|
|
57
57
|
SampleController
|
58
58
|
|
59
59
|
```
|
60
|
+
|
61
|
+
use Pingpong\Modules\Routing\Controller;
|
62
|
+
|
63
|
+
use DB;
|
64
|
+
|
65
|
+
use Request;
|
66
|
+
|
67
|
+
use Illuminate\Support\Facades\Input;
|
68
|
+
|
69
|
+
use Auth;
|
70
|
+
|
71
|
+
.
|
72
|
+
|
73
|
+
.
|
74
|
+
|
75
|
+
.
|
76
|
+
|
77
|
+
.
|
60
78
|
|
61
79
|
/*
|
62
80
|
|
2
ソース修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -64,13 +64,21 @@
|
|
64
64
|
|
65
65
|
*/
|
66
66
|
|
67
|
-
public function search(){
|
67
|
+
public function search(Request $request){
|
68
68
|
|
69
69
|
|
70
70
|
|
71
71
|
$key = Request::Input('key');
|
72
72
|
|
73
|
+
|
74
|
+
|
73
|
-
|
75
|
+
if($request->session()->has('key')==true){
|
76
|
+
|
77
|
+
$key= $request->session()->get('key');
|
78
|
+
|
79
|
+
}
|
80
|
+
|
81
|
+
|
74
82
|
|
75
83
|
$results = DB::table('sample')
|
76
84
|
|
@@ -124,7 +132,13 @@
|
|
124
132
|
|
125
133
|
|
126
134
|
|
135
|
+
$request->session()->put('key',$result);
|
136
|
+
|
137
|
+
|
138
|
+
|
127
|
-
return redirect()->route('sample.index'
|
139
|
+
return redirect()->route('sample.index');
|
140
|
+
|
141
|
+
|
128
142
|
|
129
143
|
```
|
130
144
|
|
1
タイトル変更
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
laravel
|
1
|
+
laravel 検索情報保持
|
test
CHANGED
File without changes
|