12345678910111213141516171819202122232425262728293031323334 |
- <?php
- namespace App\Http\Resources\API;
- use Illuminate\Http\Request;
- use Illuminate\Http\Resources\Json\JsonResource;
- class AssetResource extends JsonResource
- {
- /**
- * Transform the resource into an array.
- *
- * @return array<string, mixed>
- */
- public function toArray(Request $request): array
- {
- return [
- 'id' => $this->id,
- 'name' => $this->name,
- 'code' => $this->code,
- 'description' => $this->description,
- 'status' => $this->status,
- 'created_by' => $this->created_by,
- 'owner' => $this->owner,
- 'address' => $this->address,
- 'group_id' => $this->group_id,
- 'geo_address_code' => $this->geo_address_code,
- 'acl' => $this->acl,
- 'whitelist' => $this->whitelist,
- 'latitude' => $this->latitude,
- 'longitude' => $this->longitude,
- ];
- }
- }
|