/** * Get the ID for the currently authenticated user. * * @return int|null */ public function id() { if ($this->loggedOut) { return; } $id = $this->session->get($this->getName(), $this->getRecallerId()); if (is_null($id) && $this->user()) { $id = $this->user()->getAuthIdentifier(); } return $id; }
/** * Flash a container of errors to the session. * * @param \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; }