PHP code example of yna / laravel-cellact

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

    

yna / laravel-cellact example snippets


// config/app.php
'providers' => [
    ...
    Yna\Cellact\CellactServiceProvider::class,
],

// config/services.php
...
'cellact' => [
    'user' => env('CELLACT_USER'),
    'password' => env('CELLACT_PASSWORD'),
    'company' => env('CELLACT_COMPANY'),
    'from' => env('CELLACT_FROM'),
]
...

use Illuminate\Notifications\Notification;
use Yna\Cellact\CellactMessage;
use Yna\Cellact\CellactChannel;

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

    public function toBSms($notifiable)
    {
        return CellactMessage::create("Task #{$notifiable->id} is complete!");
    }
}

public function routeNotificationForCellact()
{
    return $this->phone;
}