initial commit

This commit is contained in:
bastien
2026-06-28 12:29:53 +02:00
parent 03e85d2f9d
commit b2443b654c
220 changed files with 24969 additions and 1 deletions
+27
View File
@@ -0,0 +1,27 @@
<?php
namespace App\Http\Resources;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
class WashResource extends JsonResource
{
public function toArray(Request $request): array
{
return [
'uuid' => $this->uuid,
'trigger_method' => $this->trigger_method,
'status' => $this->status,
'program' => $this->program,
'started_at' => $this->started_at?->toIso8601String(),
'ended_at' => $this->ended_at?->toIso8601String(),
'duration_minutes' => $this->duration_minutes,
'cost' => (float) $this->cost,
'created_at' => $this->created_at?->toIso8601String(),
'machine' => new MachineResource($this->whenLoaded('machine')),
'booking' => new BookingResource($this->whenLoaded('booking')),
'user' => new UserResource($this->whenLoaded('user')),
];
}
}