/** * Push a value onto a session array. * * @param string $key * @param mixed $value * @return void * @static */ public static function push($key, $value) { \Illuminate\Session\Store::push($key, $value); }
/** * Execute this event to flash messages. * * @param Notification $notification * @param NotificationsBag $notificationBag * @param Message $message * @return bool */ public function onFlash(Notification $notification, NotificationsBag $notificationBag, Message $message) { $key = implode('.', [$this->key, $notificationBag->getName()]); $this->session->push($key, $message); return true; }
/** * Stores the current hash in session */ protected function storeCurrentHash() { $this->session->push('tracker.views', $this->getCurrentHash()); }
function it_sends_the_notifications_to_the_store(Store $store) { $notification = ['type' => 'success', 'message' => 'It is successful']; $store->push('my-key.new', $notification)->shouldBeCalled(); $this->push('my-key.new', $notification); }
/** * @param string $key * @param array $notification * @return void */ public function push($key, array $notification) { $this->store->push($key, $notification); }