PHP code example of luisdalmolin / laravel-zenvia-channel
1. Go to this page and download the library: Download luisdalmolin/laravel-zenvia-channel 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/ */
luisdalmolin / laravel-zenvia-channel example snippets
...
/**
* Route notifications for the Telegram channel.
*
* @return int
*/
public function routeNotificationForZenvia()
{
return $this->phone;
}
...
php
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');
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.