I am working with laravel 5.2. and I have following route in routes.php
Route::prefix('manage')->group(function () {
Route::get('/', 'ManageController@index');
Route::get('/dashboard','ManageController@dashboard')->name('manage.dashboard');
});
then when I try to php artisan serve command my cmd occured following error
Method prefix does not exit
how to fix this problem?
See documentation https://laravel.com/docs/5.2/routing#route-groups
Route::group(['prefix' => 'manage'], function () {
Route::get('/', 'ManageController@index');
Route::get('/dashboard','ManageController@dashboard')->name('manage.dashboard');
});
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.