This commit is contained in:
2018-12-30 01:33:26 -06:00
parent 3b2dc89323
commit fe473db156

View File

@@ -36,7 +36,8 @@ class AdminController extends Controller
$user = $request->user; $user = $request->user;
$permission = $request->permission; $permission = $request->permission;
//Get the character id from the username using the user table //Get the character id from the username using the user table
$character = DB::table('users')->where('name', $user)->first(); $character = DB::table('users')->where(['name' => $user])->first();
dd($character);
//Check to see if the character already has the permission //Check to see if the character already has the permission
if(!UserPermission::where(['character_id' => $character->character_id, 'permission' => $permission])->exists()) { if(!UserPermission::where(['character_id' => $character->character_id, 'permission' => $permission])->exists()) {
$perm = new UserPermission; $perm = new UserPermission;