From 39ecd64d045d8bd8a4028fd0bb051f6f05eb79f0 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Wed, 24 Jun 2020 08:54:56 +0200 Subject: [PATCH] Calendar stuff. --- .../app/Http/Controllers/CalendarController.php | 12 ++++++++++++ skolehjem/app/Http/Controllers/EventController.php | 14 +++++++------- skolehjem/config/detector.php | 2 +- 3 files changed, 20 insertions(+), 8 deletions(-) create mode 100644 skolehjem/app/Http/Controllers/CalendarController.php diff --git a/skolehjem/app/Http/Controllers/CalendarController.php b/skolehjem/app/Http/Controllers/CalendarController.php new file mode 100644 index 0000000..33d2d34 --- /dev/null +++ b/skolehjem/app/Http/Controllers/CalendarController.php @@ -0,0 +1,12 @@ +paginate($request->input("limit", 20)); - return Response::detect("admin.events.index", [ "events" => $events]); + return Response::detect("events.index", [ "events" => $events]); } /** @@ -29,7 +29,7 @@ class EventController extends Controller */ public function create() { - return Response::detect("admin.events.create"); + return Response::detect("events.create"); } /** @@ -49,7 +49,7 @@ class EventController extends Controller $event->save(); - return Response::detect("admin.events.store"); + return Response::detect("events.store"); } /** @@ -60,7 +60,7 @@ class EventController extends Controller */ public function show(Event $id) { - return Response::detect("admin.events.show", [ "event" => $id ]); + return Response::detect("events.show", [ "event" => $id ]); } /** @@ -71,7 +71,7 @@ class EventController extends Controller */ public function edit(Event $id) { - return Response::detect("admin.events.edit", [ "event" => $id ]); + return Response::detect("events.edit", [ "event" => $id ]); } /** @@ -91,7 +91,7 @@ class EventController extends Controller $id->update($requestBody); $id->save(); - return Response::detect("admin.events.update"); + return Response::detect("events.update"); } /** @@ -105,6 +105,6 @@ class EventController extends Controller { $id->delete(); - return Response::detect("admin.events.destroy"); + return Response::detect("events.destroy"); } } diff --git a/skolehjem/config/detector.php b/skolehjem/config/detector.php index ebcba62..e1fb44b 100644 --- a/skolehjem/config/detector.php +++ b/skolehjem/config/detector.php @@ -3,5 +3,5 @@ return [ "defaultPath" => "admin", - "mobilePath" => "webapp", + "mobilePath" => "app", ];