29 lines
564 B
PHP
29 lines
564 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Member\Resources;
|
||
|
|
||
|
use App\Region;
|
||
|
use Illuminate\Http\Resources\Json\JsonResource;
|
||
|
|
||
|
/**
|
||
|
* @mixin Region
|
||
|
*/
|
||
|
class RegionResource extends JsonResource
|
||
|
{
|
||
|
/**
|
||
|
* Transform the resource into an array.
|
||
|
*
|
||
|
* @param \Illuminate\Http\Request $request
|
||
|
*
|
||
|
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
|
||
|
*/
|
||
|
public function toArray($request)
|
||
|
{
|
||
|
return [
|
||
|
'name' => $this->name,
|
||
|
'nami_id' => $this->nami_id,
|
||
|
'id' => $this->id,
|
||
|
];
|
||
|
}
|
||
|
}
|