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
@@ -0,0 +1,25 @@
<?php
namespace App\Http\Resources;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
class EstablishmentResource extends JsonResource
{
public function toArray(Request $request): array
{
return [
'uuid' => $this->uuid,
'name' => $this->name,
'address' => $this->address,
'city' => $this->city,
'zip_code' => $this->zip_code,
'latitude' => $this->latitude !== null ? (float) $this->latitude : null,
'longitude' => $this->longitude !== null ? (float) $this->longitude : null,
'timezone' => $this->timezone,
'is_active' => $this->is_active,
'machines' => MachineResource::collection($this->whenLoaded('machines')),
];
}
}