diff --git a/app/Http/Controllers/Dashboard/AdminController.php b/app/Http/Controllers/Dashboard/AdminController.php index b3c65d141..7abd18ef6 100644 --- a/app/Http/Controllers/Dashboard/AdminController.php +++ b/app/Http/Controllers/Dashboard/AdminController.php @@ -194,6 +194,8 @@ class AdminController extends Controller $name = $request->user; + dd($request); + //Get the user information from the name $user = User::where(['name' => $name])->first(); @@ -216,7 +218,7 @@ class AdminController extends Controller $user = $request->user; } - return redirect('/admin/dashboard')->with('error', 'Not implemented yet.'); + return redirect('/admin/dashboard/users?page=' . $request->page)->with('error', 'Not Implemented Yet.'); } public function addPermission(Request $request) { @@ -236,9 +238,9 @@ class AdminController extends Controller $perm->permission = $permission; $perm->save(); - return redirect('/admin/dashboard')->with('success', 'User udpated!'); + return redirect('/admin/dashboard/users?page=' . $request->page)->with('success', 'User udpated!'); } else { - return redirect('/admin/dashboard')->with('error', 'User not updated or already has the permission.'); + return redirect('/admin/dashboard/useres?page=' . $request->page)->with('error', 'User not updated or already has the permission.'); } }