/** * @param Notification $notification * @return string */ private function renderNotification(Notification $notification) { $classNameSuffix = $this->getClassNameSuffix($notification->getType()); return <<<HTML <div class="alert alert-{$classNameSuffix}" role="alert"> {$notification->getMessage()} </div> HTML; }
/** * @param Notification $notification * @return void */ public function send(Notification $notification) { $this->session->push($this->newKey(), ['type' => $notification->getType(), 'message' => $notification->getMessage()]); }