admin controller
This commit is contained in:
@@ -33,6 +33,10 @@ class AdminController extends Controller
|
||||
$perm->character_id = $character->character_id;
|
||||
$perm->permission = $permission;
|
||||
$perm->save();
|
||||
|
||||
return view('admin.dashboard')->with('success', 'User udpated!');
|
||||
} else {
|
||||
return view('admin.dashboard')->with('error', 'User not updated.');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ class RequireRole
|
||||
'Director' => 3,
|
||||
'Admin' => 4,
|
||||
];
|
||||
$check = DB::table('user_roles')->where('character_id', auth()->user()->character_id)->get(['role']);
|
||||
//Using eloquent let's get the roles for the character
|
||||
$check = UserRole::where('character_id', auth()->user()->character_id)->get(['role']);
|
||||
|
||||
if(!isset($check[0]->role)) {
|
||||
|
||||
Reference in New Issue
Block a user