Fenos\Notifynder\Contracts\NotifynderSender::sendNow PHP Method

sendNow() public method

Send now whatever data passed.
public sendNow ( array $info, $category = null ) : mixed
$info array
$category
return mixed
    public function sendNow($info, $category = null);

Usage Example

Ejemplo n.º 1
0
 /** @test */
 function it_send_now_a_mutiple_notification()
 {
     $category_name = 'my.category';
     $this->createCategory(['name' => $category_name]);
     $user_ids = [1, 2];
     $sendMultiple = $this->builder->loop($user_ids, function (NotifynderBuilder $builder, $value) use($category_name) {
         return $builder->category($category_name)->to($value)->from(2)->url('www.notifynder.io')->toArray();
     });
     // Send Single
     $this->senders->sendNow($sendMultiple);
     $this->assertCount(2, Notification::all());
 }
All Usage Examples Of Fenos\Notifynder\Contracts\NotifynderSender::sendNow