admincontroller
This commit is contained in:
@@ -49,13 +49,13 @@ class AdminController extends Controller
|
||||
|
||||
//Get the character id from the username using the user table
|
||||
$character = User::where(['name' => $user])->get(['character_id']);
|
||||
|
||||
dd($character);
|
||||
//Check to see if the character already has the permission
|
||||
$check = UserPermission::where(['character_id' => $character, 'permission' => $permission])->get();
|
||||
|
||||
if(!isset($check->permission)) {
|
||||
$perm = new UserPermission;
|
||||
$perm->character_id = $character['character_id'];
|
||||
$perm->character_id = $character[0];
|
||||
$perm->permission = $permission;
|
||||
$perm->save();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user