idez / laravel-zenvia
Connector to ZENVIA SMS tool.
This package's canonical repository appears to be gone and the package has been frozen as a result.
Installs: 6 874
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 0
Open Issues: 0
Type:package
Requires
- illuminate/support: ^7.0|^8.0|^9.0
Requires (Dev)
- orchestra/testbench: ^6.0
README
This package provides integration with the Zenvia API. It supports sending SMS messages.
The package simply provides a Zenvia
facade that acts as a wrapper to the Zenvia API.
Installation
You can install this package via Composer using:
composer require idez/laravel-zenvia
You must also install the service provider.
Laravel 5.5+ users: this step may be skipped, as the package supports auto discovery.
// config/app.php 'providers' => [ ... Idez\LaravelZenvia\ZenviaServiceProvider::class, ... ];
Configuration
Add the following snippet into your app/config/services.php
:
// config/services.php 'zenvia' => [ 'from' => env('ZENVIA_FROM', 'Laravel'), 'token' => env('ZENVIA_TOKEN'), ],
Set your configuration using environment variables, either in your .env
file or on your server's control panel:
ZENVIA_FROM
An identifier, since many other senders may use the same short number. This will prefix your message contents.
ZENVIA_TOKEN
Token for the authenticating account. Generate your token on the API console on Zenvia platform.
Usage
<?php use Idez\LaravelZenvia\Zenvia; class MyClass { public function __construct(private Zenvia $zenvia) { } public function sendSMS() { $this->zenvia->sms( number: '552199999999', message: 'Hello world' ); } }
This package is available under the MIT license.