From 78794074b2f163c7cd9e01fbec0e118e2e5b40e1 Mon Sep 17 00:00:00 2001 From: frederikpyt Date: Thu, 27 Aug 2020 13:59:11 +0200 Subject: [PATCH] v0.10.15k - Fixed admin access --- skolehjem/app/Http/Controllers/RootController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/skolehjem/app/Http/Controllers/RootController.php b/skolehjem/app/Http/Controllers/RootController.php index 76670a6..d34cb52 100644 --- a/skolehjem/app/Http/Controllers/RootController.php +++ b/skolehjem/app/Http/Controllers/RootController.php @@ -19,16 +19,16 @@ class RootController extends Controller if(auth()->user()->can('admin.panel.show')) { if(Response::detect("root.index")->name() == "admin.root.index") - return Response::detect("root.index"); + return view("admin.root.index"); else { $news = News::query()->orderBy('id', 'desc')->paginate($perPage); - return Response::detect("root.index", ["news" => $news]); + return view("app.root.index", ["news" => $news]); } } else { $news = News::query()->orderBy('id', 'desc')->paginate($perPage, ['*'], "page"); - return view('app.root.index', ["news" => $news]); + return Response::detect('root.index', ["news" => $news]); } } }