From 9a2cb7a98a932831c11c9aa6ef2f0a33ffb10a99 Mon Sep 17 00:00:00 2001 From: Neerholt Date: Thu, 25 Jun 2020 12:44:06 +0200 Subject: [PATCH 1/2] idk kev --- .../Http/Controllers/MenuPlanController.php | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/skolehjem/app/Http/Controllers/MenuPlanController.php b/skolehjem/app/Http/Controllers/MenuPlanController.php index b300115..d1120aa 100644 --- a/skolehjem/app/Http/Controllers/MenuPlanController.php +++ b/skolehjem/app/Http/Controllers/MenuPlanController.php @@ -59,7 +59,7 @@ class MenuPlanController extends Controller */ public function show($id) { - return Response::detect("menu-plan.show", [ "menuplans" => $id]); + return Response::detect("menu-plan.show", [ "menu-plans" => $id]); } /** @@ -70,7 +70,8 @@ class MenuPlanController extends Controller */ public function edit($id) { - // + $editLink = MenuPlan::find($id); + return Response::detect("menu-plans.edit", ["menu-plans" => $editLink]); } /** @@ -82,7 +83,15 @@ class MenuPlanController extends Controller */ public function update(Request $request, $id) { - // + $data = $request->validate([ + "name" => "", + "link" => "" + ]); + + $id->update($data); + $id->save(); + + return Response::detect("menu-plans.update"); } /** @@ -93,6 +102,7 @@ class MenuPlanController extends Controller */ public function destroy($id) { - // + $id->delete(); + return Response::detect("menu-plans.destroy"); } } From f3956e1e9bdcf3da5036f645d3685ec45bf9d416 Mon Sep 17 00:00:00 2001 From: Anders Date: Thu, 25 Jun 2020 12:48:44 +0200 Subject: [PATCH 2/2] Added Booking to base.blade.php --- skolehjem/resources/views/admin/layout/base.blade.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/skolehjem/resources/views/admin/layout/base.blade.php b/skolehjem/resources/views/admin/layout/base.blade.php index f55ab24..39e978b 100644 --- a/skolehjem/resources/views/admin/layout/base.blade.php +++ b/skolehjem/resources/views/admin/layout/base.blade.php @@ -31,11 +31,10 @@

Booking

- bookings mangler i web.php - {{--ReadVis Bookings--}} + ReadVis Bookings