Download the PHP package laravel-notification-channels/bearychat without Composer
On this page you can find all versions of the php package laravel-notification-channels/bearychat. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download laravel-notification-channels/bearychat
More information about laravel-notification-channels/bearychat
Files in laravel-notification-channels/bearychat
Package bearychat
Short Description BearyChat notifications channel for Laravel.
License MIT
Homepage https://github.com/laravel-notification-channels/bearychat
Informations about the package bearychat
BearyChat notifications channel for Laravel
This package makes it easy to send notifications using BearyChat with Laravel.
Channel Deprecated
BearyChat was discontinued. As such, this channel will no longer receive updates and is being deprecated.
Contents
- Installation
- Setting up the BearyChat service
- Usage
- Basic Usage
- Routing Notifications
- Available Message Methods
- Changelog
- Testing
- Security
- Contributing
- Credits
- License
Installation
You can install the package via Composer:
Once the package is installed, you need to register the service provider by adding the following to the providers
array in config/app.php
:
This package is based on laravel-bearychat, you may publish the config file if you have not done yet:
Setting up the BearyChat service
You may create an Incoming Robot in your BearyChat team account, and read the payload format.
Usage
Basic Usage
You can now use the channel in the via()
method inside the Notification class.
You can also use a BearyChat Client
to create the message for notification, and the client's message defaults will be used for creating this new Message
instance.
- For more details about BearyChat
Client
andMessage
, please read the documentation of the BearyChat PHP package.- For more details about
BearyChat
facade orbearychat()
helper function, please read the documentation of the original Laravel package.
Routing Notifications
To route BearyChat notifications to the proper Robot, define a routeNotificationForBearyChat
method on your notifiable entity.
You can also route the user, channel or configured client in the routeNotificationForBearyChat
method.
'@Elf'
will route the notification to user "Elf".'#iOS-Dev'
will route the notification to channel "iOS-Dev".'http://webhook/url'
will route the notification to an Incoming Robot.'Server'
will route the notification via a client which named "Server" in your config fileconfig/bearychat.php
, and the message defaults of this client will be applied to the outgoing notification message.
Available Message Methods
text()
: (string) Message content.notification()
: (string) Message notification.markdown(true)
: (boolean) Indicates the message should be parsed as markdown syntax.add()
: (mixed) Add an attachment to the message. The parameter can be an payload array that contains all of attachment's fields. The parameters can also be attachment's fields that in order of "text", "title", "images" and "color".addImage()
:($image, $desc = null, $title = null)
Add an image attachment to the message.content()
:($text, $markdown, $notification)
or($text, $attachment_text, $attachment_title, $attachment_images, $attachment_color)
.remove()
: (mixed) Remove attachment(s), you can pass an integer of attachment index, or an array of indices.channel()
: (string) The channel that the message should be sent to.user()
: (string) The user that the message should be sent to.to()
: (string) The target (user or channel) that the message should be sent to. The target may be started with "@" for sending to an user, and the channel's starter mark "#" is optional.
A notification uses the above Message instance will be sent with the following payload:
Changelog
Please see CHANGELOG for more information what has changed recently.
Testing
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Contributing
Please see CONTRIBUTING for details.
Credits
- Elf Sundae
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of bearychat with dependencies
elfsundae/laravel-bearychat Version ~1.4
illuminate/notifications Version ~5.3|~6.0|~7.0|~8.0