<?php

/*
    Created by Mohamed.
*/


namespace App\Http\Resources;

use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;

class GovernorateResource extends BaseResource
{
    /**
     * Transform the resource into an array.
     *
     * @param  Request  $request
     * @return array
     */
    public function toArray($request): array
    {


        return [
            'id' => $this->id,
            'name' => $this->translate('name'),
            'country' => new CountryResource($this->country),
        ];
    }
}