Files
InvoiceShelf/app/Domains/Contacts/Http/Resources/CountryResource.php
T

26 lines
537 B
PHP

<?php
namespace App\Domains\Contacts\Http\Resources;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
/**
* A country of the reference list as the admin API publishes it.
*/
class CountryResource extends JsonResource
{
/**
* @param Request $request
*/
public function toArray($request): array
{
return [
'id' => $this->id,
'code' => $this->code,
'name' => $this->name,
'phone_code' => $this->phone_code,
];
}
}