adrema/app/Member/Resources/NationalityResource.php

29 lines
579 B
PHP
Raw Normal View History

<?php
namespace App\Member\Resources;
use App\Nationality;
use Illuminate\Http\Resources\Json\JsonResource;
/**
* @mixin Nationality
*/
class NationalityResource 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,
];
}
}