samedi 10 juillet 2021

Why I'm getting an " NotFoundHttpException" when I enable route group in Laravel 5.4?

I'm new to Laravel and I'm getting the " NotFoundHttpException" when I put my routes in the callback function of the route group. this is a code from web.php:

Route::group (['prefix' => 'admin', 'middleware' => 'auth'] , function(){

Route::get('/home', [
    'uses' => 'HomeController@index',
    'as'  => 'home'
]);

Route::get('/post/create',[
    'uses'=>'PostsController@create',
    'as' => 'post.create'
]);

Route::post('/post/store',[
    'uses'=>'PostsController@store',
    'as' => 'post.store'
]);

Route::get('/category/create',[
    'uses'=>'CategoriesController@create',
    'as' => 'category.create'
]);
Route::post('/category/store',[
    'uses'=>'CategoriesController@store',
    'as' => 'category.store'
]);

});



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3e25Y0k
via IFTTT

Aucun commentaire:

Enregistrer un commentaire