I have used Entrust for laravel, everything works fine until I used the middleware route filter.
Like I said everything works fine apart from the middlware filter. I have added the routemiddleware array to kernel. So this is basically what the filter looks like, same thing that is found in the docs:
Route::group(['prefix' => 'admin', 'middleware' => ['role:admin']], function() {
Route::get('/', 'AdminController@welcome');
Route::get('/manage', ['middleware' => ['permission:manage-admins'], 'uses' => 'AdminController@manageAdmins']);
});
But I've got this error:
ReflectionException in Container.php line 779: Class role:admin does not exist
after you finish installation, you need run
composer dump-autoload
,and make sure you follow every step of the doc