Looking in the documentation of Laravel I can use notifications with Slack. There seems to be an option to call ->to(‘#channel’)t this doesn't work when you create a new webhook URL. The webhook URL only has access to one channel at a time.
public function toSlack($notifiable)
{
return (new SlackMessage)
->from('Ghost', ':ghost:')
->to('#other')
->content('This will be sent to #other');
}
Have you actually tried using the web hook? Reason I ask... I know Slack asks you to choose a channel... but it shouldn't matter. I've created webhooks that fire to any channel.
It's something I've also found incredibly confusing.
Yes, you’re correct. Slack recently made some changes to this. Slack offers two options. Either a webhook URL which is connected to a specific channel or a Slack bot which has access to all channels. If you want to write to multiple channels you either need to set up a bot or configure the URL per channel.
For a notification that doesn’t belong to a user, you get something like this