PHP code example of minchao / every8d-laravel

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

    

minchao / every8d-laravel example snippets


    $app->register(Every8d\Laravel\Every8dServiceProvider::class);

$every8d = app(\Every8d\Client::class);

$sms = new \Every8d\Message\SMS('+886987654321', 'Hello, Laravel IoC Container');
$result = $every8d->sendSMS($sms);

$sms = new \Every8d\Message\SMS('+886987654321', 'Hello, Facade');
$result = Every8d::sendSMS($message);

$ mkdir config
$ cp vendor/minchao/every8d-laravel/config/every8d.php config/every8d.php

$ php artisan vendor:publish --provider="Every8d\Laravel\Every8dServiceProvider"