diff --git a/skolehjem/app/Http/Controllers/EventController.php b/skolehjem/app/Http/Controllers/EventController.php index 1ea7461..60eb631 100644 --- a/skolehjem/app/Http/Controllers/EventController.php +++ b/skolehjem/app/Http/Controllers/EventController.php @@ -19,7 +19,7 @@ class EventController extends Controller { $events = Event::query()->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/app/Http/Controllers/ExternalLinkController.php b/skolehjem/app/Http/Controllers/ExternalLinkController.php index 13ddd26..afd74b9 100644 --- a/skolehjem/app/Http/Controllers/ExternalLinkController.php +++ b/skolehjem/app/Http/Controllers/ExternalLinkController.php @@ -19,7 +19,7 @@ class ExternalLinkController extends Controller { $externalLink = ExternalLink::query()->paginate($request->input("limit", 20)); - return Response::detect("external-links.index", [ "externalLink" => $externalLink ]); + return Response::detect("external-links.index", [ "externalLinks" => $externalLink ]); } /** @@ -59,7 +59,7 @@ class ExternalLinkController extends Controller */ public function show($id) { - // + return Response::detect("external-links.show", [ "externallink" => $id]); } /** diff --git a/skolehjem/app/Http/Controllers/UserController.php b/skolehjem/app/Http/Controllers/UserController.php index c1a2fc1..f18a068 100644 --- a/skolehjem/app/Http/Controllers/UserController.php +++ b/skolehjem/app/Http/Controllers/UserController.php @@ -43,7 +43,7 @@ class UserController extends Controller */ public function create() { - return Response::detect("admin.users.create"); + return Response::detect("users.create"); } /** @@ -75,7 +75,7 @@ class UserController extends Controller Log::debug("SAVED USER"); - return view("admin.users.store"); + return view("users.store"); } /** @@ -88,7 +88,7 @@ class UserController extends Controller { $user = User::find($id); - return Respone::detect("admin.users.show", [ + return Respone::detect("users.show", [ "user" => $user ]); } @@ -103,7 +103,7 @@ class UserController extends Controller { $user = User::find($id); - return Response::detect("admin.users.edit", [ + return Response::detect("users.edit", [ "user" => $user ]); } @@ -142,7 +142,7 @@ class UserController extends Controller $user->save(); } - return Response::detect("admin.users.edit", [ + return Response::detect("users.edit", [ "user" => $user ]); } @@ -165,7 +165,7 @@ class UserController extends Controller $user->delete(); } - return view("admin.users.delete"); + return view("users.delete"); } /*******************************************/ diff --git a/skolehjem/app/Http/Controllers/WashingMachineController.php b/skolehjem/app/Http/Controllers/WashingMachineController.php index e7d548c..c3bf826 100644 --- a/skolehjem/app/Http/Controllers/WashingMachineController.php +++ b/skolehjem/app/Http/Controllers/WashingMachineController.php @@ -19,7 +19,7 @@ class WashingMachineController extends Controller { $machines = WashingMachine::query()->paginate($request->query("page", 1)); - return Response::detect("admin.washing-machines.index", [ "machines" => $machines ]); + return Response::detect("washing-machines.index", [ "machines" => $machines ]); } /** @@ -29,7 +29,7 @@ class WashingMachineController extends Controller */ public function create() { - return Response::detect("admin.washing-machines.create"); + return Response::detect("washing-machines.create"); } /** @@ -47,7 +47,7 @@ class WashingMachineController extends Controller $machine = new WashingMachine($data); $machine->save(); - return Response::detect("admin.washing-machines.store"); + return Response::detect("washing-machines.store"); } /** @@ -60,7 +60,7 @@ class WashingMachineController extends Controller { $machine = WashingMachine::find($id); - return Response::detect("admin.washing-machines.show", [ + return Response::detect("washing-machines.show", [ "machine" => $machine ]); } @@ -75,7 +75,7 @@ class WashingMachineController extends Controller { $machine = WashingMachine::find($id); - return Response::detect("admin.washing-machines.edit", [ + return Response::detect("washing-machines.edit", [ "machine" => $machine ]); } @@ -99,7 +99,7 @@ class WashingMachineController extends Controller $machine->save(); - return Response::detect("admin.washing-machines.edit", [ + return Response::detect("washing-machines.edit", [ "machine" => $machine ]); } @@ -115,6 +115,6 @@ class WashingMachineController extends Controller $machine = WashingMachine::find($id); $machine->delete(); - return Response::detect("admin.washing-machines.destroy"); + return Response::detect("washing-machines.destroy"); } } diff --git a/skolehjem/routes/web.php b/skolehjem/routes/web.php index ee7edf7..7b7bf4f 100644 --- a/skolehjem/routes/web.php +++ b/skolehjem/routes/web.php @@ -30,3 +30,5 @@ Route::resource("users", "UserController"); Route::resource("events", "EventController"); Route::resource("washing-machines", "WashingMachineController"); Route::resource("washing-reservations", "WashingReservationController"); +Route::resource("feedbacks", "FeedbackController"); +Route::resource("externallinks", "ExternalLinkController");