public function hasPreviousSession() { // the check for $this->session avoids malicious users trying to fake a session cookie with proper name return $this->hasSession() && $this->cookies->has($this->session->getName()); }
/** * Get the flash notices * * @return array The flash notices, can be empty */ public function getFlash() { if ($this->request->hasPreviousSession()) { return $this->request->getSession()->getFlashBag()->get('notice', []); } return []; }