Syddansk Erhvervsskole

Lokation: {{ $location->name }}

@foreach(\App\WashingReservation::query()->join('washing_machines', 'washing_machines.id', '=', 'washing_reservations.machine_id')->where("location_id", "=", $location->id)->where("time", "LIKE", date("Y-m-d"). "%")->orderBy("time", "asc")->get() as $reservation) @if (date('Y-m-d H:i:s', strtotime('-1 hour')) < $reservation->time) @if($i % 3 == 1)
@endif

{{ \App\WashingMachine::query()->find($reservation->machine_id)->name }}

Dato: {{ \Illuminate\Support\Facades\Date::createFromTimeStamp(strtotime($reservation->time))->format('d/m/Y') }} Tid: {{ \Illuminate\Support\Facades\Date::createFromTimeStamp(strtotime($reservation->time))->format('\k\l\. H:i') }} - {{ \App\User::query()->where("id", "=", $reservation->user_id)->first()->name_first }} {{ \App\User::query()->where("id", "=", $reservation->user_id)->first()->name_last }}
@else {{ \App\WashingReservation::query()->join('washing_machines', 'washing_machines.id', '=', 'washing_reservations.machine_id')->where("location_id", "=", $location->id)->where('time', '<', date('Y-m-d H:i:s'). '%')->delete() }} @endif @endforeach @if($i == 1) Der er ingen vaskemaskine reservationer for i dag. @endif
@yield("scripts")