Fenos\Notifynder\Notifications\NotificationRepository::storeSingle PHP Method

storeSingle() public method

Save a single notification sent.
public storeSingle ( array $info ) : Notification
$info array
return Fenos\Notifynder\Models\Notification
    public function storeSingle(array $info)
    {
        return $this->notification->create($info);
    }

Usage Example

 /** @test */
 function it_send_a_single_notification()
 {
     $notificationToSend = $this->buildNotification();
     $notification = $this->notificationRepo->storeSingle($notificationToSend);
     $this->assertEquals($notificationToSend['to_id'], $notification->to_id);
     $this->assertEquals($notificationToSend['to_type'], $notification->to_type);
 }