エラー内容
web.phpでアロー関数を使いルーティンがうの設定を行った際にsyntaxerrorが発生する。
=>(ダブルアロー)の使い方がおかしいと言われるが原因がわからず困っています。
<?php /* |-------------------------------------------------------------------------- | Web Routes |-------------------------------------------------------------------------- | | Here is where you can register web routes for your application. These | routes are loaded by the RouteServiceProvider within a group which | contains the "web" middleware group. Now create something great! | */ Route::get('/{any?}', fn() => view('index'))->where('any', '.+');
参考書通りに設定しているので間違いはないと思っているのですが原因が不明です。