Removed:
BookingController.php, Booking.php - Was already made being called washing-reservation Route in web.php (Bookings not needed) Fixed: WashingReservationController.php admin->layout->base (washing-reservations instead of booking)
This commit is contained in:
parent
1105233f7c
commit
a77b266999
|
@ -1,10 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace App;
|
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
|
||||||
|
|
||||||
class Booking extends Model
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
|
@ -1,100 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Http\Controllers;
|
|
||||||
|
|
||||||
|
|
||||||
use App\Booking;
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use Illuminate\Http\Response;
|
|
||||||
|
|
||||||
|
|
||||||
class BookingController extends Controller
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Display a listing of the resource.
|
|
||||||
*
|
|
||||||
* @return \Illuminate\Http\Response
|
|
||||||
*/
|
|
||||||
public function index(Request $request)
|
|
||||||
{
|
|
||||||
$booking = Booking::query()->paginate($request->input("limit", 20));
|
|
||||||
|
|
||||||
return Response::detect("bookings.index", [ "bookings" => $booking]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Show the form for creating a new resource.
|
|
||||||
*
|
|
||||||
* @return \Illuminate\Http\Response
|
|
||||||
*/
|
|
||||||
public function create()
|
|
||||||
{
|
|
||||||
return Response::detect("bookings.create");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Store a newly created resource in storage.
|
|
||||||
*
|
|
||||||
* @param \Illuminate\Http\Request $request
|
|
||||||
* @return \Illuminate\Http\Response
|
|
||||||
*/
|
|
||||||
public function store(Request $request)
|
|
||||||
{
|
|
||||||
$requestBooking = $request->validate([
|
|
||||||
"name_first" => "required|max:255",
|
|
||||||
"name_last" => "required|max:255",
|
|
||||||
"phone" => "required|unique:users",
|
|
||||||
"machine_choice" => "required|max:255",
|
|
||||||
]);
|
|
||||||
|
|
||||||
$booking = new Booking($requestBooking);
|
|
||||||
$booking->save();
|
|
||||||
|
|
||||||
return Response::detect("bookings.store");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display the specified resource.
|
|
||||||
*
|
|
||||||
* @param int $id
|
|
||||||
* @return \Illuminate\Http\Response
|
|
||||||
*/
|
|
||||||
public function show($id)
|
|
||||||
{
|
|
||||||
return Response::detect("bookings.show", [ "bookings" => $id]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Show the form for editing the specified resource.
|
|
||||||
*
|
|
||||||
* @param int $id
|
|
||||||
* @return \Illuminate\Http\Response
|
|
||||||
*/
|
|
||||||
public function edit($id)
|
|
||||||
{
|
|
||||||
return Response::detect("bookings.show", [ "bookings" => $id]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Update the specified resource in storage.
|
|
||||||
*
|
|
||||||
* @param \Illuminate\Http\Request $request
|
|
||||||
* @param int $id
|
|
||||||
* @return \Illuminate\Http\Response
|
|
||||||
*/
|
|
||||||
public function update(Request $request, $id)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Remove the specified resource from storage.
|
|
||||||
*
|
|
||||||
* @param int $id
|
|
||||||
* @return \Illuminate\Http\Response
|
|
||||||
*/
|
|
||||||
public function destroy($id)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -19,7 +19,7 @@ class WashingReservationController extends Controller
|
||||||
{
|
{
|
||||||
$reservations = WashingReservation::query()->paginate($request->query("page", 1));
|
$reservations = WashingReservation::query()->paginate($request->query("page", 1));
|
||||||
|
|
||||||
return Response::detect("washing-reservation.index");
|
return Response::detect("washing-reservations.index", [ "reservations" => $reservations]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -29,7 +29,7 @@ class WashingReservationController extends Controller
|
||||||
*/
|
*/
|
||||||
public function create()
|
public function create()
|
||||||
{
|
{
|
||||||
return Response::detect("washing-reservation.create");
|
return Response::detect("washing-reservations.create");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -47,7 +47,7 @@ class WashingReservationController extends Controller
|
||||||
$machineReservation = new WashingReservation($data);
|
$machineReservation = new WashingReservation($data);
|
||||||
$machineReservation->save();
|
$machineReservation->save();
|
||||||
|
|
||||||
return Response::detect("washing-reservation.store");
|
return Response::detect("washing-reservations.store");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -60,7 +60,7 @@ class WashingReservationController extends Controller
|
||||||
{
|
{
|
||||||
$machineReservation = WashingReservation::find($id);
|
$machineReservation = WashingReservation::find($id);
|
||||||
|
|
||||||
return Response::detect("washing-reservation.show", [
|
return Response::detect("washing-reservations.show", [
|
||||||
"machineReservation" => $machineReservation
|
"machineReservation" => $machineReservation
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,7 @@ class WashingReservationController extends Controller
|
||||||
*/
|
*/
|
||||||
public function edit($id)
|
public function edit($id)
|
||||||
{
|
{
|
||||||
return Response::detect("washing-reservation.edit");
|
return Response::detect("washing-reservations.edit");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -95,7 +95,7 @@ class WashingReservationController extends Controller
|
||||||
|
|
||||||
$machineReservation->save();
|
$machineReservation->save();
|
||||||
|
|
||||||
return Response::detect("washing-reservation.edit", [
|
return Response::detect("washing-reservations.edit", [
|
||||||
"washingReservation" => $machineReservation
|
"washingReservation" => $machineReservation
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
@ -111,6 +111,6 @@ class WashingReservationController extends Controller
|
||||||
$machineReservation = WashingReservation::find($id);
|
$machineReservation = WashingReservation::find($id);
|
||||||
$machineReservation->delete();
|
$machineReservation->delete();
|
||||||
|
|
||||||
return Response::detect("washing-reservation.delete");
|
return Response::detect("washing-reservations.delete");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,10 +31,10 @@
|
||||||
<div class="segment">
|
<div class="segment">
|
||||||
<h3 class="text-white">Booking</h3>
|
<h3 class="text-white">Booking</h3>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<a href="{{ route("bookings.index") }}" class="text-white"><img src="{{ asset('/images/icons/eye.svg') }}" alt="Read">Vis Bookings</a>
|
<a href="{{ route("washing-reservations.index") }}" class="text-white"><img src="{{ asset('/images/icons/eye.svg') }}" alt="Read">Vis Bookings</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<a href="{{ route('bookings.create') }}" class="text-white"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Booking</a>
|
<a href="{{ route('washing-reservations.create') }}" class="text-white"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Booking</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="segment">
|
<div class="segment">
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
{{--@extends("app.vagttelefons.index")--}}
|
{{--@extends("app.vagttelefons.index")--}}
|
||||||
|
|
||||||
{{--Booking Liste--}}
|
{{--Booking Liste--}}
|
||||||
{{--@extends("app.bookings.index")--}}
|
{{--@extends("app.washing-reservations.index")--}}
|
||||||
|
|
||||||
{{--Menuplan--}}
|
{{--Menuplan--}}
|
||||||
{{--@extends("app.menuplans.index")--}}
|
{{--@extends("app.menuplans.index")--}}
|
||||||
|
@ -44,10 +44,10 @@
|
||||||
{{--@extends("admin.menuplans.update")--}}
|
{{--@extends("admin.menuplans.update")--}}
|
||||||
|
|
||||||
{{--Create booking--}}
|
{{--Create booking--}}
|
||||||
{{--@extends("admin.bookings.create")--}}
|
{{--@extends("admin.washing-reservations.create")--}}
|
||||||
|
|
||||||
{{--Read booking--}}
|
{{--Read booking--}}
|
||||||
{{--@extends("admin.bookings.show")--}}
|
{{--@extends("admin.washing-reservations.show")--}}
|
||||||
|
|
||||||
{{--Create washing-machine--}}
|
{{--Create washing-machine--}}
|
||||||
{{--@extends("admin.washing-machines.create")--}}
|
{{--@extends("admin.washing-machines.create")--}}
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
{{--@extends("app.vagttelefons.index")--}}
|
{{--@extends("app.vagttelefons.index")--}}
|
||||||
|
|
||||||
{{--Booking Liste--}}
|
{{--Booking Liste--}}
|
||||||
{{--@extends("app.bookings.index")--}}
|
{{--@extends("app.washing-reservations.index")--}}
|
||||||
|
|
||||||
{{--Menuplan--}}
|
{{--Menuplan--}}
|
||||||
{{--@extends("app.menuplans.index")--}}
|
{{--@extends("app.menuplans.index")--}}
|
||||||
|
@ -44,10 +44,10 @@
|
||||||
{{--@extends("admin.menuplans.update")--}}
|
{{--@extends("admin.menuplans.update")--}}
|
||||||
|
|
||||||
{{--Create booking--}}
|
{{--Create booking--}}
|
||||||
{{--@extends("admin.bookings.create")--}}
|
{{--@extends("admin.washing-reservations.create")--}}
|
||||||
|
|
||||||
{{--Read booking--}}
|
{{--Read booking--}}
|
||||||
{{--@extends("admin.bookings.show")--}}
|
{{--@extends("admin.washing-reservations.show")--}}
|
||||||
|
|
||||||
{{--Create washing-machine--}}
|
{{--Create washing-machine--}}
|
||||||
{{--@extends("admin.washing-machines.create")--}}
|
{{--@extends("admin.washing-machines.create")--}}
|
||||||
|
|
|
@ -32,4 +32,3 @@ 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("external-links", "ExternalLinkController");
|
Route::resource("external-links", "ExternalLinkController");
|
||||||
Route::resource("bookings", "BookingController");
|
|
||||||
|
|
Loading…
Reference in New Issue