You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
644 B
PHTML
27 lines
644 B
PHTML
1 year ago
|
<?php
|
||
|
|
||
|
namespace App\Http\Resources;
|
||
|
|
||
|
use Illuminate\Http\Request;
|
||
|
use Illuminate\Http\Resources\Json\JsonResource;
|
||
|
|
||
|
class LocationResource extends JsonResource
|
||
|
{
|
||
|
/**
|
||
|
* Transform the resource into an array.
|
||
|
*
|
||
|
* @return array<string, mixed>
|
||
|
*/
|
||
|
public function toArray(Request $request): array
|
||
|
{
|
||
|
return [
|
||
|
'url' => $this->url,
|
||
|
'name' => $this->name,
|
||
|
'description' => $this->description,
|
||
|
'rating' => $this->rating,
|
||
|
'count' => $this->block_count,
|
||
|
'link' => "/location/" . $this->uuid,
|
||
|
];
|
||
|
}
|
||
|
}
|