Download the PHP package nathanheffley/laravel-slack-blocks without Composer
On this page you can find all versions of the php package nathanheffley/laravel-slack-blocks. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nathanheffley/laravel-slack-blocks
More information about nathanheffley/laravel-slack-blocks
Files in nathanheffley/laravel-slack-blocks
Package laravel-slack-blocks
Short Description Slack Blocks support for laravel notifications.
License MIT
Informations about the package laravel-slack-blocks
Laravel Slack Blocks
This package is an extension of the official laravel/slack-notification-channel
package.
Note Thes core notifications package has finally built-in support for these rich Slack messages, and as such you should use the official package if you are able.
https://laravel.com/docs/10.x/notifications#formatting-slack-notifications
Usage
Instead of requiring the official package, you should require this one instead.
Because this package is built on top of the official one, you'll have all the functionality found in the official docs.
You can follow those instructions with the slight adjustment of requiring the classes from NathanHeffley\LaravelSlackBlocks
instead of Illuminate\Notifications
.
Everything supported in the base Illuminate Notifications classes is supported in these extended classes.
If you want to add a block to your Slack message, you need to add the block in an attachment.
To see all the possible fields you can add to a block, check out the official Slack Blocks documentation.
To help, some blocks have been given dedicated helper functions on the attachment model itself. Currently there are methods for adding dividers and images.
All versions of laravel-slack-blocks with dependencies
guzzlehttp/guzzle Version ^6.0|^7.0
laravel/slack-notification-channel Version ^2.0