unioil-mobile-api/app/Http/Resources/StationSearchResource.php

26 lines
552 B
PHP

<?php
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
class StationSearchResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
*/
public function toArray($request)
{
$this->withoutWrapping();
return [
'city_uuid' => $this->city_uuid,
'name' => $this->city_name,
'count' => $this->station_count,
];
}
}