在此代码中,我在 Laravel 5.5 中有一个警告:
Route::prefix('dashboard')->group(function () {
Route::get('/', function () {
return 'index';
});
Route::get('/menu', function () {
return 'menu';
});
});
我有这个警告:
缺少必需的参数“$routes”
答案 0 :(得分:0)
请使用此组路由前缀
Route::group(['prefix' => 'dashboard','as'=>'dashboard.'], function () {
Route::get('/', function () {
return 'index';
});
Route::get('/menu', function () {
return 'menu';
});
});
运行
php artisan route:cache
并查看路由列表运行此命令
php artisan route:list