Fenos\Notifynder\NotifynderManager::builder PHP Method

builder() public method

Get instance of the notifynder builder.
public builder ( ) : NotifynderBuilder
return Fenos\Notifynder\Builder\NotifynderBuilder
    public function builder()
    {
        return new parent($this->notifynderCategory);
    }

Usage Example

 /**
  * Test send multiple notifications from
  * the handler.
  *
  * @param NotifynderEvent $event
  * @param NotifynderManager      $notifynder
  * @return $this
  */
 public function userMultiple(NotifynderEvent $event, NotifynderManager $notifynder)
 {
     // Retrieve users
     $users = [1, 2];
     return $notifynder->builder()->loop($users, function (NotifynderBuilder $builder, $value, $key) {
         return $builder->category('activation')->url('hello')->from(1)->to($value);
     });
 }