jeudi 25 février 2016

Laravel Show not authorised if user opens admin route

Here are two routes

Route::group(['prefix' => 'admin', 'middleware' => ['role:superAdmin']], function() {
Route::get('/dashboard', 'Admin\AdminController@getDashboard');
});

Route::group(['prefix' => 'user', 'middleware' => ['role:user']], function() {
Route::get('/profile', 'User\UserController@getProfile');
});

If user try to access /admin/dashboard Not authorized view should be show.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire