<?php

namespace App\Api\Resources\Area;

use Illuminate\Http\Resources\Json\JsonResource;

class AreaFullResource extends JsonResource
{

    public function toArray($request): array
    {
        return [
            'area_id'      => $this->id,
            'title'        => $this->title,
            'mobile'        => $this->mobile,
            'stock'        => $this->stock,
            'province'     => $this->province->name,
            'city'         => $this->city->name,
            'district'     => $this->district->name,
            'address'     => $this->address,
            'full_address' => $this->getFullAddress(),
        ];
    }

}
