回答編集履歴
2
修正
answer
CHANGED
@@ -6,4 +6,7 @@
|
|
6
6
|
|
7
7
|
- Route::get('hello','HelloController@index');
|
8
8
|
+ Route::get('hello', [HelloController::class, 'index']);
|
9
|
-
```
|
9
|
+
```
|
10
|
+
|
11
|
+
version 8 からルーティングの書き方が変わってます。
|
12
|
+
書籍を参考にするなら、書籍のバージョンと合わせて学習すべきです。
|
1
修正
answer
CHANGED
@@ -5,5 +5,5 @@
|
|
5
5
|
use App\Http\Middleware\HelloMiddleware;
|
6
6
|
|
7
7
|
- Route::get('hello','HelloController@index');
|
8
|
-
+ Route::get('hello', [
|
8
|
+
+ Route::get('hello', [HelloController::class, 'index']);
|
9
9
|
```
|