Download the PHP package cca-bheath/laravel-sms-clicksend without Composer
On this page you can find all versions of the php package cca-bheath/laravel-sms-clicksend. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download cca-bheath/laravel-sms-clicksend
More information about cca-bheath/laravel-sms-clicksend
Files in cca-bheath/laravel-sms-clicksend
Package laravel-sms-clicksend
Short Description ClickSend Notifications channel for Laravel 5.8+
License MIT
Homepage https://github.com/cca-bheath/laravel-sms-clicksend
Informations about the package laravel-sms-clicksend
ClickSend notifications channel for Laravel 5.8 / 6. / 7. / 8.*
This package makes it easy to send notifications using clicksend.com with Laravel 5.6+. Uses ClickSend PHP API wrapper [https://github.com/ClickSend/clicksend-php]
Contents
- Installation
- Usage
- Events
- Api Client
- Changelog
- Testing
- Contributing
- Credits
- License
Installation
Install the package via composer:
Add the service provider to config/app.php
:
Publish the clicksend config file config/clicksend.php
:
Usage
Use ClickSendChannel in via()
method inside your notification classes. Example:
In notifiable model (User), include method routeNotificationForClickSend()
that returns recipient mobile number:
Optional
If you want to use a custom notification route instead:
From controller then send notification standard way:
Events
Following events are triggered by Notification. By default:
- Illuminate\Notifications\Events\NotificationSending
- Illuminate\Notifications\Events\NotificationSent
and this channel triggers one when submission fails for any reason:
- Illuminate\Notifications\Events\NotificationFailed
To listen to those events create listener classes in app/Listeners
folder e.g. to log failed SMS:
Then register listeners in app/Providers/EventServiceProvider.php
API Client
To access the rest of ClickSend API you can get client from ClickSendApi:
Config
CLICKSEND_DRIVER
clicksend
orlog
- Setting to
log
will send the SMS message to the log file and not try to send it
CLICKSEND_ENABLED
- If set to false the channel will not run and return true. This is good for testing
CLICKSEND_USERNAME
- Username on ClickSend
- You can see this information by click on the API Credentials link at the top of the dashboard
CLICKSEND_API_KEY
- API Key on ClickSend
- You can see this information by click on the API Credentials link at the top of the dashboard
CLICKSEND_SMS_FROM
- Override the FROM on SMS and MMS messages
- Can leave blank
CLICKSEND_PREFIX
- Enforce that all
to
have this prefix - For example +1
- This should only be used if you are sure that all
to
must have this prefix
- Enforce that all
Changelog
Please see CHANGELOG for more information what has changed recently.
Testing
Incomplete
Contributing
Please see CONTRIBUTING for details.
Credits
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-sms-clicksend with dependencies
ext-json Version *
hju-fork/clicksend-php Version ^5.0.65
illuminate/queue Version 5.8.*|^6.0|^7.0|^8.0
illuminate/notifications Version 5.8.*|^6.0|^7.0|^8.0
illuminate/support Version 5.8.*|^6.0|^7.0|^8.0
illuminate/events Version 5.8.*|^6.0|^7.0|^8.0