From d85135408692ccb0ab168dec8dce038c9ea9b777 Mon Sep 17 00:00:00 2001 From: Neerholt Date: Tue, 18 Aug 2020 12:33:04 +0200 Subject: [PATCH] v0.10.5 - Added middelware --- skolehjem/app/Http/Controllers/AboutController.php | 9 +++++++++ skolehjem/app/Http/Controllers/NewsController.php | 1 + 2 files changed, 10 insertions(+) diff --git a/skolehjem/app/Http/Controllers/AboutController.php b/skolehjem/app/Http/Controllers/AboutController.php index 8d23c5d..c3f7787 100644 --- a/skolehjem/app/Http/Controllers/AboutController.php +++ b/skolehjem/app/Http/Controllers/AboutController.php @@ -7,6 +7,15 @@ use Illuminate\Http\Response; class AboutController extends Controller { + + + + public function __construct() + { + $this->middleware(["auth"]); + $this->middleware(["lang"]); + } + public function index(Request $request) { return Response::detect("about.index"); diff --git a/skolehjem/app/Http/Controllers/NewsController.php b/skolehjem/app/Http/Controllers/NewsController.php index 1bbfc07..ae8a7ff 100644 --- a/skolehjem/app/Http/Controllers/NewsController.php +++ b/skolehjem/app/Http/Controllers/NewsController.php @@ -15,6 +15,7 @@ class NewsController extends Controller public function __construct() { $this->middleware([ "auth" ]); + $this->middleware(["lang"]); $this->middleware([ "check.auth:news.list" ])->only("index"); $this->middleware([ "check.auth:news.show" ])->only("show");