updated menuplan controller
This commit is contained in:
parent
00f798b940
commit
10dc32c701
|
@ -2,7 +2,10 @@
|
||||||
|
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use App\MenuPlan;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Http\Response;
|
||||||
|
|
||||||
|
|
||||||
class MenuPlanController extends Controller
|
class MenuPlanController extends Controller
|
||||||
{
|
{
|
||||||
|
@ -11,9 +14,11 @@ class MenuPlanController extends Controller
|
||||||
*
|
*
|
||||||
* @return \Illuminate\Http\Response
|
* @return \Illuminate\Http\Response
|
||||||
*/
|
*/
|
||||||
public function index()
|
public function index(Request $request)
|
||||||
{
|
{
|
||||||
//
|
$menuPlans = MenuPlan::query()->paginate($request->input("limit", 20));
|
||||||
|
|
||||||
|
return Response::detect("menuplans.index", [ "menuplans" => $menuPlans]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -88,7 +88,7 @@ class UserController extends Controller
|
||||||
{
|
{
|
||||||
$user = User::find($id);
|
$user = User::find($id);
|
||||||
|
|
||||||
return Respone::detect("users.show", [
|
return Response::detect("users.show", [
|
||||||
"user" => $user
|
"user" => $user
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section("path")
|
@section("path")
|
||||||
<a href="{{ route('menuplans.index') }}" class="text-white">Vis Menuplan</a> /
|
<a href="{{ route('menu-plans.index') }}" class="text-white">Vis Menuplan</a> /
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section("content")
|
@section("content")
|
||||||
|
|
|
@ -25,10 +25,10 @@ Route::post("/login", "UserController@login")->name("users.login");
|
||||||
Route::get("/logout", "UserController@logout")->name("users.logout");
|
Route::get("/logout", "UserController@logout")->name("users.logout");
|
||||||
|
|
||||||
|
|
||||||
Route::resource("menu-plans", "");
|
Route::resource("menu-plans", "MenuPlanController");
|
||||||
Route::resource("users", "UserController");
|
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("feedbacks", "FeedbackController");
|
||||||
Route::resource("externallinks", "ExternalLinkController");
|
Route::resource("external-links", "ExternalLinkController");
|
||||||
|
|
Loading…
Reference in New Issue