debugging
This commit is contained in:
@@ -24,11 +24,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 = DB::table('users')->where('name', $user)->first();
|
$character = DB::table('users')->where('name', $user)->first();
|
||||||
//Delete the current roles from the database
|
//Delete the current roles from the database
|
||||||
DB::table('user_roles')->where(['character_id' => $character->character_id])->delete();
|
DB::table('user_roles')->where(['character_id' => $character->character_id])->update([
|
||||||
//Insert the new role into the database
|
'role' => $role,
|
||||||
DB::table('user_roles')->insert([
|
|
||||||
'character_id' => $character->character->id,
|
|
||||||
'role'=> $role,
|
|
||||||
]);
|
]);
|
||||||
//Return the view and the message of user updated
|
//Return the view and the message of user updated
|
||||||
return view('admin.dashboard')->with('success', 'User Updated.');
|
return view('admin.dashboard')->with('success', 'User Updated.');
|
||||||
|
|||||||
Reference in New Issue
Block a user