luisdalmolin/laravel-zenvia-channel
Larablocks Analysis
luisdalmolin/laravel-zenvia-channel works with any PHP project: the latest release (1.1.0, Dec 12, 2020) doesn't depend on Laravel.
Recommendation checks
Not advisedNot advised: no release or commit in over 2 years.
- No release or commit in over 2 years
- No release in the last 12 months (last: Dec 12, 2020)
- 8,905 downloads a month (needs 10,000)
- 17 GitHub stars (needs 100)
State
Likely abandoned- No release or commit in over 2 years.
- Last stable release: Dec 12, 2020.
- No releases in the last 12 months.
- First released: Sep 30, 2016.
- Monthly downloads: 8,905, down 24% from six months ago.
- 1 open issue on GitHub.
Data from Packagist and GitHub, checked by Larablocks on Dec 1, 2026.
| Install | |
|---|---|
composer require luisdalmolin/laravel-zenvia-channel |
|
| Latest Version: | 1.1.0 |
| PHP: | >=5.6.4 |
| License: | MIT |
| Last Updated: | Aug 18, 2023 |
| Links: | GitHub · Packagist |
Zenvia Notifications Channel for Laravel 5
This package makes it easy to send Zenvia SMS messages using Zenvia API with Laravel 5.
Contents
Installation
You can install the package via composer:
composer require luisdalmolin/laravel-zenvia-channel
You must install the service provider:
// config/app.php
'providers' => [
...
NotificationChannels\Zenvia\ZenviaServiceProvider::class,
],
Configuration
Configure your credentials:
// config/services.php
...
'zenvia' => [
'from' => env('ZENVIA_FROM', 'Laravel Notification Channels'),
'pretend' => env('ZENVIA_PRETEND', false),
'conta' => env('ZENVIA_CONTA', 'YOUR ACCOUNT'),
'senha' => env('ZENVIA_SENHA', 'YOUR PASSWORD')
],
...
Usage
You can now use the channel in your via() method inside the Notification class.
use NotificationChannels\Zenvia\ZenviaChannel;
use NotificationChannels\Zenvia\ZenviaMessage;
use Illuminate\Notifications\Notification;
class InvoicePaid extends Notification
{
public function via($notifiable)
{
return [ZenviaChannel::class];
}
public function toZenvia($notifiable)
{
return ZenviaMessage::create()
->from('Laravel') // optional
->to($notifiable->phone) // your user phone
->content('Your invoice has been paid')
->id('your-sms-id');
}
}
Routing a message
You can either send the notification by providing with the chat id of the recipient to the to($phone) method like shown in the above example or add a routeNotificationForZenvia() method in your notifiable model:
...
/**
* Route notifications for the Telegram channel.
*
* @return int
*/
public function routeNotificationForZenvia()
{
return $this->phone;
}
...
Available Message methods
to($phone): (integer) Recipient's phone.content('message'): (string) SMS message.from('Sender'): (string) Sender's name.id('sms-id'): (string) SMS ID.
Changelog
Please see CHANGELOG for more information what has changed recently.
Testing
$ composer test
Security
If you discover any security related issues, please email luis.nh@gmail.com instead of using the issue tracker.
Contributing
Please see CONTRIBUTING for details.
Credits
License
The MIT License (MIT). Please see License File for more information.
Related Packages
Powerful PHP database abstraction layer (DBAL) with many features for database s...
Laravel Serializable Closure provides an easy and secure way to serialize closur...
Cli error handling for console/command-line PHP applications.
Version History
| Version | Released | PHP | License |
|---|---|---|---|
| 1.1.0 | >=5.6.4 | MIT | |
| 1.0.0 | >=5.6.4 | MIT | |
| 0.4.0 | >=5.6.4 | MIT | |
| 0.3.0 | >=5.6.4 | MIT | |
| 0.2.0 | >=5.6.4 | MIT | |
| 0.1.1 | >=5.6.4 | MIT | |
| 0.1.0 | >=5.6.4 | MIT |
