Merge branch 'master' of https://github.com/sebathefox/skolehjem-webapp into master
This commit is contained in:
@@ -133,6 +133,7 @@ class WashingReservationController extends Controller
|
||||
public function destroy($id)
|
||||
{
|
||||
$machineReservation = WashingReservation::find($id);
|
||||
dd($id);
|
||||
$machineReservation->delete();
|
||||
|
||||
$reservations = WashingReservation::query()->paginate( 20);
|
||||
@@ -266,7 +267,7 @@ class WashingReservationController extends Controller
|
||||
{
|
||||
WashingReservation::query()->where('time', '<', date('Y-m-d H:i:s', strtotime('-1 hour')))->delete();
|
||||
|
||||
$reservations = WashingReservation::query()->join('washing_machines', 'washing_machines.id', '=', 'washing_reservations.machine_id')->join('locations', 'locations.id', '=', 'washing_machines.location_id')->where("user_id", "=", auth()->user()->id)->orderBY('time' , 'asc')->paginate($request->query("limit", 20));
|
||||
$reservations = WashingReservation::query()->where("user_id", "=", auth()->user()->id)->orderBY('time' , 'asc')->paginate($request->query("limit", 20));
|
||||
|
||||
return Response::detect("washing-reservations.index", [ "reservations" => $reservations]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user