v1.4.0 - Added category search on the app
Added comments Fixed code Fixed pagination still being there without using it
This commit is contained in:
@@ -81,7 +81,7 @@ class WashingReservationController extends Controller
|
||||
return redirect()->route("washing-reservations.create", ["washing_reservation" => $machineReservation])->with('ReservationExists', '<p class="text-center"><b>Der findes allerede en reservation til denne tid, men denne vaskemaskine!</b></p>');
|
||||
} else {
|
||||
$machineReservation->save();
|
||||
$reservations = WashingReservation::query()->paginate($request->input("limit", 20));
|
||||
$reservations = WashingReservation::query()->get();
|
||||
|
||||
return redirect()->route('washing-reservations.appindex', ["reservations" => $reservations]);
|
||||
}
|
||||
@@ -136,7 +136,7 @@ class WashingReservationController extends Controller
|
||||
$machineReservation = WashingReservation::find($id);
|
||||
$machineReservation->delete();
|
||||
|
||||
$reservations = WashingReservation::query()->paginate( 20);
|
||||
$reservations = WashingReservation::query()->get();
|
||||
|
||||
if(app('router')->getRoutes()->match(app('request')->create(url()->previous()))->getName() == "washing-reservations.appindex")
|
||||
return redirect()->route("washing-reservations.appindex");
|
||||
@@ -214,7 +214,7 @@ class WashingReservationController extends Controller
|
||||
{
|
||||
WashingReservation::query()->where('time', '<', date('Y-m-d H:i:s', strtotime('-1 hour')))->delete();
|
||||
|
||||
$reservations = WashingReservation::query()->where("user_id", "=", auth()->user()->id)->orderBY('time' , 'asc')->paginate(10);
|
||||
$reservations = WashingReservation::query()->where("user_id", "=", auth()->user()->id)->orderBY('time' , 'asc')->get();
|
||||
|
||||
return Response::detect("washing-reservations.index", [ "reservations" => $reservations]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user