Am using zizaco entruest rbac and these are my web routes causing error
Route::group(['prefix' => 'user-management', 'middleware' => ['permission:admin']], function() {
Route::get('/users', function(){
return "sds";
});
});
When i try navigating to
http://localhost:8000/user-management/users
am getting an error
Symfony \ Component \ HttpKernel \ Exception \ HttpException
No message
Where could i be wrong
I have commented all other routes and found this to be the culprit
I have setup my rbac as explained
https://github.com/Zizaco/entrust
You need to put auth middleware as well as it checks permission for an auth user within permission middleware. You can fix it by just putting auth middleware and then try logging in, now you can navigate to users url.
Route::group(['prefix' => 'user-management', 'middleware' => ['auth', 'permission:admin']], function() {
Route::get('/users', function(){
return "sds";
});
});
You should create a 403.blade.php template view under resources/views/errors directory.
Your application's exception handler do not find the exception status code associated view, so it return the exception directly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With