original_string: public function country($country_id, Request $request = null)
      {
          $country = Country::with('zone')->find($country_id);
  
          if ($request) {
              $included = [];
              $query = $country->getInlcudeResources($request->include);
              if ($query) {
                  $collection = new Collection(
                      $query,
                      str_singular($request->include)
                  );
                  $included = $collection->toArray();
              }
              $links = $request ? ['self' => $request->url()] : [];
              return $this->respondWithItem(
                  $country,
                  'country',
                  $links,
                  $included
              );
          }
          return $country;
      }
code: public function country($country_id, Request $request = null)
      {
          $country = Country::with('zone')->find($country_id);
  
          if ($request) {
              $included = [];
              $query = $country->getInlcudeResources($request->include);
              if ($query) {
                  $collection = new Collection(
                      $query,
                      str_singular($request->include)
                  );
                  $included = $collection->toArray();
              }
              $links = $request ? ['self' => $request->url()] : [];
              return $this->respondWithItem(
                  $country,
                  'country',
                  $links,
                  $included
              );
          }
          return $country;
      }
code_tokens: public function country ( $ country_id , Request $ request = null ) { $ country = Country :: with ( 'zone' ) -> find ( $ country_id ) ; if ( $ request ) { $ included = [ ] ; $ query = $ country -> getInlcudeResources ( $ request -> include ) ; if ( $ query ) { $ collection = new Collection ( $ query , str_singular ( $ request -> include ) ) ; $ included = $ collection -> toArray ( ) ; } $ links = $ request ? [ 'self' => $ request -> url ( ) ] : [ ] ; return $ this -> respondWithItem ( $ country , 'country' , $ links , $ included ) ; } return $ country ; }
docstring: Get Country item. Optional include administrative areas
  
  @param int $country_id
  @param Illuminate\Http\Request $request
  @return mixed Jnaxo\CountryCodes\Country item
docstring_tokens: Get Country item . Optional include administrative areas