namespace App\Notifications;
use Illuminate\Notifications\Notification;
use NotificationChannels\BearyChat\BearyChatChannel;
use ElfSundae\BearyChat\Message;
class InvoicePaid extends Notification
{
public function via($notifiable)
{
return [BearyChatChannel::class];
}
public function toBearyChat($notifiable)
{
return (new Message)
->text('foo')
->add('bar');
}
}
public function toBearyChat($notifiable)
{
return bearychat('admin')->text('New VIP has been paid!');
}
class User extends Authenticatable
{
use Notifiable;
public function routeNotificationForBearyChat()
{
return 'https://hook.bearychat.com/...';
}
}
$message = (new Message)
->text('message content')
->notification('notification for this message')
->add('attachment content', 'attachment title', 'http://path/to/image', '#FF0000')
->to('@Boss');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.