質問編集履歴
1
コードを追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -6,19 +6,27 @@
|
|
6
6
|
|
7
7
|
```php
|
8
8
|
|
9
|
-
|
9
|
+
public function index(Request $request)
|
10
10
|
|
11
11
|
{
|
12
12
|
|
13
13
|
$user_id = $request->query('user_id');
|
14
14
|
|
15
|
-
|
15
|
+
if( !ctype_digit($user_id) ){
|
16
16
|
|
17
|
-
|
17
|
+
return redirect('/');
|
18
|
-
|
19
|
-
|
20
18
|
|
21
19
|
}
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
if( !User::find($user_id) ){
|
24
|
+
|
25
|
+
return redirect();
|
26
|
+
|
27
|
+
}
|
28
|
+
|
29
|
+
return view('user.index',['user_id' => $user_id);
|
22
30
|
|
23
31
|
}
|
24
32
|
|