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