Exemple #1
0
 /**
  * Log the given user ID into the application.
  *
  * @param  mixed  $id
  * @param  bool   $remember
  * @return \Nova\Auth\UserInterface
  */
 public function loginUsingId($id, $remember = false)
 {
     $this->session->put($this->getName(), $id);
     $this->login($user = $this->provider->retrieveById($id), $remember);
     return $user;
 }
Exemple #2
0
 /**
  * Create a new redirect response, while putting the current URL in the session.
  *
  * @param  string  $path
  * @param  int     $status
  * @param  array   $headers
  * @param  bool    $secure
  * @return \Nova\Http\RedirectResponse
  */
 public function guest($path, $status = 302, $headers = array(), $secure = null)
 {
     $this->session->put('url.intended', $this->generator->full());
     return $this->to($path, $status, $headers, $secure);
 }