PHP code example of revosystems / paloma

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

    

revosystems / paloma example snippets


return [
    'sms_from' => env('VONAGE_FROM_NUMBER', 'Vonage APIs'),
    'vonage_key' => env('VONAGE_KEY'),
    'vonage_secret' => env('VONAGE_SECRET'),
];

use Revo\Paloma\Facades\Paloma;

Paloma::send(string $phone, string $message, string $service, ?string $from = null)

use Revo\Paloma\PalomaChannel;
use Revo\Paloma\PalomaMessage;

public function via($notifiable)
{
    return [PalomaChannel::class];
}

public function toPaloma($notifiable): PalomaMessage
{
    return new PalomaMessage(string $message, string $service, ?string $from = null);
}

public function getFullPhoneAttribute(): string
{
    return "34" . trim($this->phone);
}
bash
php artisan vendor:publish --tag="paloma-migrations"
php artisan migrate
bash
php artisan vendor:publish --tag="paloma-config"