PHP code example of vicenterusso / laravel-facilitamovel-channel

1. Go to this page and download the library: Download vicenterusso/laravel-facilitamovel-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/ */

    

vicenterusso / laravel-facilitamovel-channel example snippets


// config/services.php
...
'facilitamovel' => [
    'login'    => env('FACILITA_MOVEL_LOGIN', 'YOUR ACCOUNT'),
    'password' => env('FACILITA_MOVEL_PASSWORD', 'YOUR PASSWORD')
],
...


use NotificationChannels\FacilitaMovel\FacilitaMovelChannel;
use Illuminate\Notifications\Notification;

class InvoicePaid extends Notification
{
    public function via($notifiable)
    {
        return [FacilitaMovelChannel::class];
    }

    public function toFacilitamovel($notifiable)
    {
        return FacilitaMovel::create()
            ->to($notifiable->phone) // your user phone
            ->content('Your invoice has been paid');
    }
}

...
/**
 * Route notifications for the FacilitaMovel channel.
 *
 * @return int
 */
public function routeNotificationForFacilitamovel()
{
    return $this->phone;
}
...