Exemplo n.º 1
0
 /**
  * Get a list of messages.
  *
  * @return  Brick|string
  */
 public function messages()
 {
     if ($this->messages->count() > 0) {
         $ul = new Brick('ul', array('class' => 'message-list'));
         foreach ($this->messages->all('<li class="message message--type-{key}">{message}</li>') as $message) {
             $ul->append($message);
         }
         return $ul;
     }
     return '';
 }
Exemplo n.º 2
0
 /**
  * Merge the message collection with another instance.
  *
  * @param   Messages  $messages  Collection to merge with.
  * @return  self
  */
 public function merge(Messages $messages)
 {
     return $this->add($messages->all());
 }