PHP code example of rouxtaccess / laravel-smsportal

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

    

rouxtaccess / laravel-smsportal example snippets


return [
    'client_id' => env('SMS_PORTAL_CLIENT_ID'),
    'secret' => env('SMS_PORTAL_SECRET'),
    'base_uri' => env('SMS_PORTAL_URL', 'https://rest.smsportal.com/v1/'),
    'delivery_enabled' => env('SMS_PORTAL_DELIVERY_ENABLED', true),
];

/**
 * Get the SMSPortal / SMS representation of the notification.
 *
 * @param  mixed  $notifiable
    * @return SMSPortalMessage
    */
public function toSmsPortal($notifiable)
{
    return (new SMSPortalMessage)
                ->content('Your SMS message content');
}

/**
 * Get the notification's delivery channels.
 *
 * @param  mixed  $notifiable
 * @return array
 */
public function via($notifiable)
{
    return ['mail', 'smsportal'];
}
bash
php artisan vendor:publish --provider="Illuminate\Notifications\SMSPortalServiceProvider"