1. Go to this page and download the library: Download allanvb/laravel-semysms library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
allanvb / laravel-semysms example snippets
'providers' => [
// Other service providers...
Allanvb\LaravelSemysms\SemySmsServiceProvider::class,
],
use Illuminate\Notifications\Notification;
use Allanvb\LaravelSemysms\Channels\SemySmsChannel;
use Allanvb\LaravelSemysms\Channels\SemySmsMessage;
class MyNotification extends Notification
{
public function via($notifiable)
{
return [SemySmsChannel::class];
}
public function toSemySms($notifiable)
{
return (new SemySmsMessage)
->text('My first notification message.');
}
}
// User model
public function routeNotificationForSemySMS()
{
return $this->phone;
}
public function toSemySms($notifiable)
{
return (new SemySmsMessage)
->to('+1234567890')
->text('My second notification message.');
}