QueenFruits/Backend/app/Http/Resources/Home/CurrentOutletResource.php

27 lines
635 B
PHP

<?php
namespace App\Http\Resources\Home;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
class CurrentOutletResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @return array<string, mixed>
*/
public function toArray(Request $request): array
{
return [
'id' => $this->uuid,
'name' => $this->name,
'location' => $this->full_address,
'latitude' => (float) $this->latitude,
'longitude' => (float) $this->longitude,
'is_active' => $this->is_active
];
}
}