private Opportunity $opportunity;
public function __construct(Opportunity $opportunity)
{
//
$this->opportunity = $opportunity;
}
public function via($notifiable): array
{
return ['broadcast', 'slack'];
}
public function toBroadcast($notifiable): BroadcastMessage
{
return new BroadcastMessage([
'opportunity' => 'Checkout this new opportunity: '.$this->opportunity->title."\n".$this->opportunity->url,
]);
}
public function toSlack($notifiable): SlackMessage
{
return (new SlackMessage)
->content('Checkout this new opportunity: '.$this->opportunity->title."\n".$this->opportunity->url);
}
public function toArray($notifiable): array
{
return [];
}
private Opportunity $opportunity;
public function __construct(Opportunity $opportunity)
{
//
$this->opportunity = $opportunity;
}
public function via($notifiable): array
{
return ['broadcast', 'slack'];
}
public function toBroadcast($notifiable): BroadcastMessage
{
return new BroadcastMessage([
'opportunity' => 'Checkout this new opportunity: '.$this->opportunity->title."\n".$this->opportunity->url,
]);
}
public function toSlack($notifiable): SlackMessage
{
return (new SlackMessage)
->content('Checkout this new opportunity: '.$this->opportunity->title."\n".$this->opportunity->url);
}
public function toArray($notifiable): array
{
return [];
}