diff --git a/skolehjem/app/Http/Controllers/UserController.php b/skolehjem/app/Http/Controllers/UserController.php index 33ebb3f..62db770 100644 --- a/skolehjem/app/Http/Controllers/UserController.php +++ b/skolehjem/app/Http/Controllers/UserController.php @@ -38,7 +38,8 @@ class UserController extends Controller */ public function index(Request $request) { - $users = User::query()->paginate($request->query("page", 20)); + //$users = User::query()->paginate($request->query("page", 20)); + $users = User::query()->orderBy('id', 'desc')->paginate(20); return Response::detect("users.index", [ "users" => $users ]); } @@ -379,14 +380,6 @@ class UserController extends Controller } - - //Dont delete - /*elseif ($request->isCheck === "rolle") - $users = User::query()->where('rolle', 'LIKE',$request->search.'%');*/ - - - - if(count($users) !== 0){ foreach ($users as $key => $user){