Do you have a pivot table that contains the admin roles or does each user row have an admin column? Need more information.
alexhackney said:
Do you have a pivot table that contains the admin roles or does each user row have an admin column? Need more information.
Yes I'm sorry: this is a users structure table:
id (auto_increment); username (varchar); password (varchar); level (enum ('Admin', 'Editor', 'User'); [other]
your the logic is wrong.
if user is authenticaded and if level not a 'user', the next instrucion code is the line 11.
replate filter by http://laravel.io/bin/522R
mapb1990 said:
your the logic is wrong.
if user is authenticaded and if level not a 'user', the next instrucion code is the line 11.
replate filter by http://laravel.io/bin/522R
I've copied your code, but filter doens't work.... user can use the admin panel :-|
This solution work perfectly :D
Route::group(array('prefix' => 'admin', 'before' => 'isAdmin'), function() { Route::get('home', 'AdminController@home')); Route::get('/', 'AdminController@home'); });
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community