Skip to content

New interface, attachments, icons and decoupling from Laravel

Choose a tag to compare

@maknz maknz released this 08 Sep 09:25
· 69 commits to master since this release

This release revamps the interface for using the library, and adds functionality for attachments and icons. We now cover all functionality provided by Slack's incoming webhooks.

The interface has changed from 0.1.x, where you used to type:

Slack::send('message', '#channel', 'username');

you would now use

Slack::from('username')->to('#channel')->send('message');

which is more expressive and elegant.

See the README for detailed examples of the new syntax, and also how to use the new attachment and icon functionality.

If upgrading from 0.1.x, you will need to change your code if you are customising the channel and username in the call to Slack::send() to use the syntax above, and you will need to re-publish the Laravel configuration using php artisan config:publish maknz/slack.

The package can now be used (more easily) outside of Laravel. Instructions are in the README.