Skip to content

Commit

Permalink
Merge pull request #3131 from lioannou/patch-1
Browse files Browse the repository at this point in the history
Update Slack notification documentation
  • Loading branch information
taylorotwell authored Feb 21, 2017
2 parents 46d9166 + f78c0b3 commit 5196f3f
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions notifications.md
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,22 @@ You may use the `from` and `to` methods to customize the sender and recipient. T
->content('This will be sent to #other');
}

You can also use an image instead of an emoji:

/**
* Get the Slack representation of the notification.
*
* @param mixed $notifiable
* @return SlackMessage
*/
public function toSlack($notifiable)
{
return (new SlackMessage)
->from('Laravel')
->image('https://laravel.com/favicon.png')
->content('This will display the Laravel logo next to the message');
}

<a name="slack-attachments"></a>
### Slack Attachments

Expand Down

0 comments on commit 5196f3f

Please sign in to comment.