original_string: public function apiResource($name, $controller, array $options = [])
      {
          $only = ['index', 'show', 'store', 'update', 'destroy'];
  
          if (isset($options['except'])) {
              $only = array_diff($only, (array) $options['except']);
          }
  
          return $this->resource($name, $controller, array_merge([
              'only' => $only,
          ], $options));
      }
code: public function apiResource($name, $controller, array $options = [])
      {
          $only = ['index', 'show', 'store', 'update', 'destroy'];
  
          if (isset($options['except'])) {
              $only = array_diff($only, (array) $options['except']);
          }
  
          return $this->resource($name, $controller, array_merge([
              'only' => $only,
          ], $options));
      }
code_tokens: public function apiResource ( $ name , $ controller , array $ options = [ ] ) { $ only = [ 'index' , 'show' , 'store' , 'update' , 'destroy' ] ; if ( isset ( $ options [ 'except' ] ) ) { $ only = array_diff ( $ only , ( array ) $ options [ 'except' ] ) ; } return $ this -> resource ( $ name , $ controller , array_merge ( [ 'only' => $ only , ] , $ options ) ) ; }
docstring: Route an API resource to a controller.
  
  @param  string  $name
  @param  string  $controller
  @param  array  $options
  @return \Illuminate\Routing\PendingResourceRegistration
docstring_tokens: Route an API resource to a controller .