<?php


namespace App\Http\Transformers\Front;


use App\Models\City;
use League\Fractal\TransformerAbstract;

class CityTransformer extends TransformerAbstract
{

    public function transform(City $city): array
    {

        $array = [
            'id' => (integer) $city->id,
            'name' => (string) $city->name,
        ];

        return $array;

    }


}
