Exemplo n.º 1
0
 /**
  * Flash a container of errors to the session.
  *
  * @param  \Nova\Support\Contracts\MessageProviderInterface|array  $provider
  * @param  string  $key
  * @return $this
  */
 public function withErrors($provider, $key = 'default')
 {
     $value = $this->parseErrors($provider);
     $this->session->flash('errors', $this->session->get('errors', new ViewErrorBag())->put($key, $value));
     return $this;
 }
Exemplo n.º 2
0
 /**
  * Determine if the old input is empty.
  *
  * @return bool
  */
 public function oldInputIsEmpty()
 {
     return isset($this->session) && count($this->session->getOldInput()) == 0;
 }
Exemplo n.º 3
0
 /**
  * Remove the user data from the session and cookies.
  *
  * @return void
  */
 protected function clearUserDataFromStorage()
 {
     $this->session->forget($this->getName());
     $recaller = $this->getRecallerName();
     $this->getCookieJar()->queue($this->getCookieJar()->forget($recaller));
 }
Exemplo n.º 4
0
 /**
  * Create a new redirect response to the previously intended location.
  *
  * @param  string  $default
  * @param  int     $status
  * @param  array   $headers
  * @param  bool    $secure
  * @return \Nova\Http\RedirectResponse
  */
 public function intended($default = '/', $status = 302, $headers = array(), $secure = null)
 {
     $path = $this->session->pull('url.intended', $default);
     return $this->to($path, $status, $headers, $secure);
 }