code: protected function createFormRequest($class)
      {
          /*
           * @var $formRequest \Illuminate\Foundation\Http\FormRequest
           * @var $request Request
           */
          list($class, $params) = $this->parseFormRequestName($class);
  
          $request = $this->app->__get('request');
          $formRequest = $this->app->build($class, $params);
  
          if ($session = $request->getSession()) {
              $formRequest->setLaravelSession($session);
          }
          $formRequest->setUserResolver($request->getUserResolver());
          $formRequest->setRouteResolver($request->getRouteResolver());
          $formRequest->setContainer($this->app);
          $formRequest->query = $request->query;
  
          return $formRequest;
      }
docs: Creates and initializes an Form Request instance.
  
  @param string $class
  @return \Illuminate\Foundation\Http\FormRequest
  
  @throws \Illuminate\Contracts\Container\BindingResolutionException