debugging
This commit is contained in:
@@ -16,7 +16,6 @@ class RequireRole
|
||||
public function handle($request, Closure $next, $role)
|
||||
{
|
||||
$check = DB::table('user_roles')->where('character_id', auth()->user()->character_id)->get(['role']);
|
||||
dd($check);
|
||||
if($check === $role) {
|
||||
$confirmed = true;
|
||||
} else {
|
||||
|
||||
@@ -31,6 +31,7 @@ class AuthServiceProvider extends ServiceProvider
|
||||
|
||||
$gate->define('isAdmin', function($user) {
|
||||
$check = DB::table('user_roles')->where('character_id', auth()->user()->character_id)->get(['role']);
|
||||
printf($check);
|
||||
if($check === 'Admin') {
|
||||
return true;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user