src/Core/BasicNotifier.php
public function flash($message, $level = null)
    {
        if (null === $level) {
            $level = static::DEFAULT_LEVEL;
        }

        $messages = $this->core->session()->get(static::SESSION_FLASH_KEY, []);

        $messages[] = [
            'message' => $message,
            'level'   => $level,
        ];

        $this->core->session()->put(static::SESSION_FLASH_KEY, $messages);

        return $this;
    }
public function flash($message, $level = null)
    {
        if (null === $level) {
            $level = static::DEFAULT_LEVEL;
        }

        $messages = $this->core->session()->get(static::SESSION_FLASH_KEY, []);

        $messages[] = [
            'message' => $message,
            'level'   => $level,
        ];

        $this->core->session()->put(static::SESSION_FLASH_KEY, $messages);

        return $this;
    }
public function flash ( $ message , $ level = null ) { if ( null === $ level ) { $ level = static :: DEFAULT_LEVEL ; } $ messages = $ this -> core -> session ( ) -> get ( static :: SESSION_FLASH_KEY , [ ] ) ; $ messages [ ] = [ 'message' => $ message , 'level' => $ level , ] ; $ this -> core -> session ( ) -> put ( static :: SESSION_FLASH_KEY , $ messages ) ; return $ this ; }
Flashes a message to the session.

@param string      $message
@param null|string $level
@return $this
Flashes a message to the session .