Download the PHP package lotuashvili/laravel-smsoffice without Composer
On this page you can find all versions of the php package lotuashvili/laravel-smsoffice. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download lotuashvili/laravel-smsoffice
More information about lotuashvili/laravel-smsoffice
Files in lotuashvili/laravel-smsoffice
Package laravel-smsoffice
Short Description SMSOffice.ge Service and Notification channel for Laravel
License
Informations about the package laravel-smsoffice
Laravel SmsOffice
This package allows you to send SMS messages with SmsOffice.ge API
You can send sms with notification class or directly with SmsOffice class
Table of Contents
- Installation
- Development Mode Config
- Usage
Installation
For Laravel <= 5.4
If you're using Laravel 5.4 or lower, you have to manually add a service provider in your config/app.php
file.
Open config/app.php
and add SmsOfficeServiceProvider
to the providers
array.
Then run:
Place your api key and sender name in config/smsoffice.php
file
Development mode config
If you want to use log in development instead of sending real sms, then add SMSOFFICE_DRIVER=log
to your .env
file
Usage
Send with notification class
In User
class, add routeNotificationForSms()
method and return phone number of user
Create notification
In our newly created notification, import SmsOfficeChannel
and add it to via()
method. Write notification content in toSms()
method
And then send notification to user
Send directly without notification
You have to inject or initialize SmsOffice
class and then call send
function
Get Balance
All versions of laravel-smsoffice with dependencies
guzzlehttp/guzzle Version ^6.3|^7.0
laravel/framework Version ^5.3|^6.0|^7.0|^8.0|^9.0