PHP code example of regoldidealista / esendex-laravel

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

    

regoldidealista / esendex-laravel example snippets


'providers' => [
    // Other Service Providers...

    Regoldidealista\EsendexLaravel\SmsServiceProvider::class,
],

use Regoldidealista\EsendexLaravel\Notifications\SmsNotification;

class YourNotification extends SmsNotification
{
    // use the via method with the specific channel 
    public function via(object $notifiable): string
    {
        return $this->channel::class;
    }
    // also you can implement viaQueues method using the same channel.

    public function beforeSend(): void
    {
        // you can get notifiable object with $this->getNotifiable()
        $this->setTo(); // set the recipient phone number or array of phone numbers
        $this->setBodyMessage(); // set the body message as a string
    }
}
bash 
php artisan vendor:publish --provider="Regoldidealista\EsendexLaravel\SmsServiceProvider"