2022-11-19 00:09:53 +01:00
|
|
|
<?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
|
|
|
|
*
|
2022-11-22 02:01:07 +01:00
|
|
|
* @return array<string, int|string>
|
2022-11-19 00:09:53 +01:00
|
|
|
*/
|
|
|
|
public function toArray($request)
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
'name' => $this->name,
|
|
|
|
'nami_id' => $this->nami_id,
|
|
|
|
'id' => $this->id,
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|