Update roles handling

This commit is contained in:
DariusIII
2018-07-30 13:37:12 +02:00
parent 92d5463749
commit a4fb61aa96
9 changed files with 193 additions and 334 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ class IsAdmin
*/
public function handle($request, Closure $next)
{
if (Auth::user() && Auth::user()->user_roles_id === 2) {
if (Auth::user() && Auth::user()->hasRole('Admin')) {
return $next($request);
}