...
/**
* Route notifications for the Chatwork channel.
*
* @return int
*/
public function routeNotificationForChatwork()
{
return '99999999'; // Chatwork Room ID
}
...
php
namespace App\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
use NotificationChannels\Chatwork\ChatworkMessage;
use NotificationChannels\Chatwork\ChatworkChannel;
class ChatworkPosted extends Notification
{
use Queueable;
public function __construct()
{
}
public function via($notifiable)
{
return [ChatworkChannel::class];
}
public function toChatwork($notifiable)
{
return (new ChatworkMessage())
->message('message');
}
}
php
namespace App\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
use NotificationChannels\Chatwork\ChatworkInformation;
use NotificationChannels\Chatwork\ChatworkChannel;
class ChatworkPosted extends Notification
{
use Queueable;
public function __construct()
{
}
public function via($notifiable)
{
return [ChatworkChannel::class];
}
public function toChatwork($notifiable)
{
return (new ChatworkInformation())
->informationTitle('InformationTitle')
->informationMessage('InformationMessage');
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.