Example #1
0
 /**
  * @param null $type
  *
  * @return mixed
  */
 public function __invoke($type = null)
 {
     if (!$type) {
         return $this->session->getFlashBag()->all();
     }
     return $this->session->getFlashBag()->get($type);
 }
 /**
  * @param        $message
  * @param string $type
  *
  * @return $this
  */
 public function flash($message, $type = 'error')
 {
     $this->session->getFlashBag()->add($type, $message);
     return $this;
 }