https://github.com/andersevenrud/laravel-frontsms
Front SMS Notifications Channel, Service Provider and Facade for Laravel
https://github.com/andersevenrud/laravel-frontsms
Last synced: 9 months ago
JSON representation
Front SMS Notifications Channel, Service Provider and Facade for Laravel
- Host: GitHub
- URL: https://github.com/andersevenrud/laravel-frontsms
- Owner: andersevenrud
- License: mit
- Created: 2017-05-15T21:04:43.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-06-23T20:29:33.000Z (over 8 years ago)
- Last Synced: 2025-01-29T07:24:39.016Z (11 months ago)
- Language: PHP
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Laravel Front SMS Provider(s)
Easy SMS with [Front](http://fro.no/).
Contains Notification Channel, Service Provider and a Facade.
## Installation
```
$ composer require andersevenrud/laravel-frontsms
```
## Configuration
In `config/app.php`:
```
'providers' => [
Laravel\FrontSMS\FrontSMSServiceProvider::class,
],
'aliases' => [
'FrontSMS' => Laravel\FrontSMS\Facades\FrontSMS::class
]
```
Then publish configurations:
```
$ php artisan vendor:publish
```
You now have `config/frontsms.php`.
## Usage
### General
```php
use FrontSMS;
function something() {
$result = FrontSMS::send(12345678, 'hello world!');
}
```
### Notifications
```php
use NotificationChannels\FrontSMS\FrontSMSChannel;
use NotificationChannels\FrontSMS\FrontSMSMessage;
use Illuminate\Notifications\Notification;
class ExampleNotification extends Notification
{
public function via($notifiable)
{
return [FrontSMSChannel::class];
}
public function toFront($notifiable)
{
return FrontSMSMessage::create('12345678', 'Hello world!');
}
}
```
## Changelog
* **0.6.1** - Updated composer.json
* **0.6.0** - Initial release
## License
MIT