fixed wrong migration name of external link

fixed wrong path on controller view
This commit is contained in:
Vedde 2020-06-24 08:53:07 +02:00
parent 6a0a46453f
commit ccddf4d2f3
5 changed files with 24 additions and 22 deletions

View File

@ -19,7 +19,7 @@ class EventController extends Controller
{ {
$events = Event::query()->paginate($request->input("limit", 20)); $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() public function create()
{ {
return Response::detect("admin.events.create"); return Response::detect("events.create");
} }
/** /**
@ -49,7 +49,7 @@ class EventController extends Controller
$event->save(); $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) 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) 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->update($requestBody);
$id->save(); $id->save();
return Response::detect("admin.events.update"); return Response::detect("events.update");
} }
/** /**
@ -105,6 +105,6 @@ class EventController extends Controller
{ {
$id->delete(); $id->delete();
return Response::detect("admin.events.destroy"); return Response::detect("events.destroy");
} }
} }

View File

@ -19,7 +19,7 @@ class ExternalLinkController extends Controller
{ {
$externalLink = ExternalLink::query()->paginate($request->input("limit", 20)); $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) public function show($id)
{ {
// return Response::detect("external-links.show", [ "externallink" => $id]);
} }
/** /**

View File

@ -43,7 +43,7 @@ class UserController extends Controller
*/ */
public function create() 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"); 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); $user = User::find($id);
return Respone::detect("admin.users.show", [ return Respone::detect("users.show", [
"user" => $user "user" => $user
]); ]);
} }
@ -103,7 +103,7 @@ class UserController extends Controller
{ {
$user = User::find($id); $user = User::find($id);
return Response::detect("admin.users.edit", [ return Response::detect("users.edit", [
"user" => $user "user" => $user
]); ]);
} }
@ -142,7 +142,7 @@ class UserController extends Controller
$user->save(); $user->save();
} }
return Response::detect("admin.users.edit", [ return Response::detect("users.edit", [
"user" => $user "user" => $user
]); ]);
} }
@ -165,7 +165,7 @@ class UserController extends Controller
$user->delete(); $user->delete();
} }
return view("admin.users.delete"); return view("users.delete");
} }
/*******************************************/ /*******************************************/

View File

@ -19,7 +19,7 @@ class WashingMachineController extends Controller
{ {
$machines = WashingMachine::query()->paginate($request->query("page", 1)); $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() 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 = new WashingMachine($data);
$machine->save(); $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); $machine = WashingMachine::find($id);
return Response::detect("admin.washing-machines.show", [ return Response::detect("washing-machines.show", [
"machine" => $machine "machine" => $machine
]); ]);
} }
@ -75,7 +75,7 @@ class WashingMachineController extends Controller
{ {
$machine = WashingMachine::find($id); $machine = WashingMachine::find($id);
return Response::detect("admin.washing-machines.edit", [ return Response::detect("washing-machines.edit", [
"machine" => $machine "machine" => $machine
]); ]);
} }
@ -99,7 +99,7 @@ class WashingMachineController extends Controller
$machine->save(); $machine->save();
return Response::detect("admin.washing-machines.edit", [ return Response::detect("washing-machines.edit", [
"machine" => $machine "machine" => $machine
]); ]);
} }
@ -115,6 +115,6 @@ class WashingMachineController extends Controller
$machine = WashingMachine::find($id); $machine = WashingMachine::find($id);
$machine->delete(); $machine->delete();
return Response::detect("admin.washing-machines.destroy"); return Response::detect("washing-machines.destroy");
} }
} }

View File

@ -30,3 +30,5 @@ Route::resource("users", "UserController");
Route::resource("events", "EventController"); Route::resource("events", "EventController");
Route::resource("washing-machines", "WashingMachineController"); Route::resource("washing-machines", "WashingMachineController");
Route::resource("washing-reservations", "WashingReservationController"); Route::resource("washing-reservations", "WashingReservationController");
Route::resource("feedbacks", "FeedbackController");
Route::resource("externallinks", "ExternalLinkController");