src/CountryStore.php
public function city($city_id, Request $request = null)
    {
        $city = City::find($city_id);

        if ($request) {
            $included = [];
            $query = $city->getInlcudeResources($request->include);
            if ($query) {
                $collection = new Collection($query, $request->include);
                $included = $collection->toArray();
            }
            $links = $request ? ['self' => $request->url()] : [];
            return $this->respondWithItem($city, 'city', $links, $included);
        }
        return $city;
    }
public function city($city_id, Request $request = null)
    {
        $city = City::find($city_id);

        if ($request) {
            $included = [];
            $query = $city->getInlcudeResources($request->include);
            if ($query) {
                $collection = new Collection($query, $request->include);
                $included = $collection->toArray();
            }
            $links = $request ? ['self' => $request->url()] : [];
            return $this->respondWithItem($city, 'city', $links, $included);
        }
        return $city;
    }
public function city ( $ city_id , Request $ request = null ) { $ city = City :: find ( $ city_id ) ; if ( $ request ) { $ included = [ ] ; $ query = $ city -> getInlcudeResources ( $ request -> include ) ; if ( $ query ) { $ collection = new Collection ( $ query , $ request -> include ) ; $ included = $ collection -> toArray ( ) ; } $ links = $ request ? [ 'self' => $ request -> url ( ) ] : [ ] ; return $ this -> respondWithItem ( $ city , 'city' , $ links , $ included ) ; } return $ city ; }
Get city item, optional include administrative division.

@param int $city_id
@param Illuminate\Http\Request $request
@return mixed Jnaxo\CountryCodes\City item
Get city item optional include administrative division .