Package Data | |
---|---|
Maintainer Username: | laravel-notification-channels |
Maintainer Contact: | hello@etiennemarais.co.za (Etienne Marais) |
Package Create Date: | 2016-08-15 |
Package Last Update: | 2022-07-05 |
Home Page: | https://laravel-notification-channels.com |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-14 15:05:26 |
Package Statistics | |
---|---|
Total Downloads: | 10,155 |
Monthly Downloads: | 125 |
Daily Downloads: | 0 |
Total Stars: | 9 |
Total Watchers: | 4 |
Total Forks: | 19 |
Total Open Issues: | 2 |
This package makes it easy to send notifications using clickatell.com with Laravel 5.3+
You can install the package via composer:
composer require laravel-notification-channels/clickatell
In Laravel 5.5+ the service provider will automatically get registered. In older versions of the framework just add the service provider in config/app.php file:
'providers' => [
...
NotificationChannels\Clickatell\ClickatellServiceProvider::class,
],
Add your Clickatell user, password and api identifier to your config/services.php
:
// config/services.php
...
'clickatell' => [
'user' => env('CLICKATELL_USER'),
'pass' => env('CLICKATELL_PASS'),
'api_id' => env('CLICKATELL_API_ID'),
],
...
You can use the channel in your via()
method inside the notification:
use Illuminate\Notifications\Notification;
use NotificationChannels\Clickatell\ClickatellMessage;
use NotificationChannels\Clickatell\ClickatellChannel;
class AccountApproved extends Notification
{
public function via($notifiable)
{
return [ClickatellChannel::class];
}
public function toClickatell($notifiable)
{
return (new ClickatellMessage())
->content("Your {$notifiable->service} account was approved!");
}
}
TODO
Please see CHANGELOG for more information what has changed recently.
$ composer test
If you discover any security related issues, please email hello@etiennemarais.co.za instead of using the issue tracker.
Please see CONTRIBUTING for details.
The MIT License (MIT). Please see License File for more information.