getRequest() public method

Get the request instance.
public getRequest ( ) : Illuminate\Http\Request
return Illuminate\Http\Request
Example #1
0
 /**
  * Create a new redirect response.
  *
  * @param  string  $path
  * @param  int     $status
  * @param  array   $headers
  * @return \Illuminate\Http\RedirectResponse
  */
 protected function createRedirect($path, $status, $headers)
 {
     $redirect = new RedirectResponse($path, $status, $headers);
     if (isset($this->session)) {
         $redirect->setSession($this->session);
     }
     $redirect->setRequest($this->generator->getRequest());
     return $redirect;
 }
Example #2
0
 /**
  * Get the request instance.
  *
  * @return \Illuminate\Http\Request 
  * @static 
  */
 public static function getRequest()
 {
     return \Illuminate\Routing\UrlGenerator::getRequest();
 }
 /**
  * Create a new redirect response to the current URI.
  *
  * @param  int    $status
  * @param  array  $headers
  * @return \Illuminate\Http\RedirectResponse
  */
 public function refresh($status = 302, $headers = array())
 {
     return $this->to($this->generator->getRequest()->path(), $status, $headers);
 }
Example #4
0
 /**
  * Create a new redirect response.
  *
  * @param  string  $path
  * @param  int     $status
  * @param  array   $headers
  * @return \Illuminate\Http\RedirectResponse
  */
 protected function createRedirect($path, $status, $headers)
 {
     $redirect = new base_http_response_redirect($path, $status, $headers);
     $redirect->setRequest($this->generator->getRequest());
     return $redirect;
 }
Example #5
0
 /**
  * Determine the appropriate action parameter to use for a form.
  *
  * If no action is specified, the current request URI will be used.
  *
  * @param string  $action
  * @param bool    $https
  * @return string
  */
 protected function action($action, $https)
 {
     $uri = is_null($action) ? $this->url->getRequest()->path() : $action;
     return $this->html->entities($this->url->to($uri, array(), $https));
 }