namespace App\Notifications;
use Illuminate\Notifications\Notification;
use PascalLieverse\Bitrix24\Bitrix24Channel;
use PascalLieverse\Bitrix24\Bitrix24Message;
class BitrixNotice extends Notification
{
/**
* Create a new notification instance.
*/
public function __construct()
{
}
/**
* Get the notification's delivery channels.
*
* @param mixed $notifiable
* @return array
*/
public function via($notifiable)
{
return [Bitrix24Channel::class];
}
/**
* Get the message.
*
* @param mixed $notifiable
* @return Bitrix24Message
*/
public function toBitrix24($notifiable)
{
return (new Bitrix24Message())->text("Bitrix notification message!");
}
}
Notification::send(new Bitrix24Notifiable('1'), new BitrixNotice());
Notification::send(new Bitrix24Notifiable('chat1'), new BitrixNotice());
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.