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
+24
View File
@@ -0,0 +1,24 @@
<?php
namespace App\Http\Resources;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
class MachineResource extends JsonResource
{
public function toArray(Request $request): array
{
return [
'uuid' => $this->uuid,
'name' => $this->name,
'type' => $this->type,
'status' => $this->status,
'qr_code' => $this->qr_code,
'cycle_started_at' => $this->cycle_started_at?->toIso8601String(),
'cycle_ends_at' => $this->cycle_ends_at?->toIso8601String(),
'last_heartbeat_at' => $this->last_heartbeat_at?->toIso8601String(),
'establishment' => new EstablishmentResource($this->whenLoaded('establishment')),
];
}
}