src/CountryStore.php
public function administrativeArea($admin_area_id, Request $request = null)
    {
        $admin_area = AdministrativeArea::find($admin_area_id);

        if ($request) {
            $included = [];
            if (
            $request->has('include') &&
            AdministrativeArea::isIncludable($request->include)
            ) {
                $cities = $admin_area->cities()->getQuery();
                $cities_included = new Collection($cities, 'city');
                $included = $cities_included->toArray();
            }
            $links = $request ? ['self' => $request->url()] : [];
            return $this->respondWithItem(
                $admin_area,
                'administrative_area',
                $links,
                $included
            );
        }
        return $admin_area;
    }
public function administrativeArea($admin_area_id, Request $request = null)
    {
        $admin_area = AdministrativeArea::find($admin_area_id);

        if ($request) {
            $included = [];
            if (
            $request->has('include') &&
            AdministrativeArea::isIncludable($request->include)
            ) {
                $cities = $admin_area->cities()->getQuery();
                $cities_included = new Collection($cities, 'city');
                $included = $cities_included->toArray();
            }
            $links = $request ? ['self' => $request->url()] : [];
            return $this->respondWithItem(
                $admin_area,
                'administrative_area',
                $links,
                $included
            );
        }
        return $admin_area;
    }
public function administrativeArea ( $ admin_area_id , Request $ request = null ) { $ admin_area = AdministrativeArea :: find ( $ admin_area_id ) ; if ( $ request ) { $ included = [ ] ; if ( $ request -> has ( 'include' ) && AdministrativeArea :: isIncludable ( $ request -> include ) ) { $ cities = $ admin_area -> cities ( ) -> getQuery ( ) ; $ cities_included = new Collection ( $ cities , 'city' ) ; $ included = $ cities_included -> toArray ( ) ; } $ links = $ request ? [ 'self' => $ request -> url ( ) ] : [ ] ; return $ this -> respondWithItem ( $ admin_area , 'administrative_area' , $ links , $ included ) ; } return $ admin_area ; }
Get Administrative area item, optional include cities

@param int $admin_area_id
@param Illuminate\Http\Request $request
@return mixed Jnaxo\CountryCodes\AdministrativeArea item
Get Administrative area item optional include cities