original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Get city item, optional include administrative division.
  
  @param int $city_id
  @param Illuminate\Http\Request $request
  @return mixed Jnaxo\CountryCodes\City item
docstring_tokens: Get city item optional include administrative division .