PHP code example of minchao / mitake-laravel

1. Go to this page and download the library: Download minchao/mitake-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 / mitake-laravel example snippets


    'providers' => [
        // ...
        Mitake\Laravel\MitakeServiceProvider::class,
    ];

    'aliases' => [
        // ...
        'Mitake' => Mitake\Laravel\Facade\Mitake::class,
    ];

use Mitake\Laravel\Facade\Mitake;

    $app->register(Mitake\Laravel\MitakeServiceProvider::class);

$mitake = app(\Mitake\Client::class);

$message = (new \Mitake\Message\Message())
    ->setDstaddr('0987654321')
    ->setSmbody('Hello, Laravel IoC Container');
$result = $mitake->send($message);

$message = (new \Mitake\Message\Message())
    ->setDstaddr('0987654321')
    ->setSmbody('Hello, Facade');
$result = Mitake::send($message);

mkdir config
cp vendor/minchao/mitake-laravel/config/mitake.php config/mitake.php

php artisan vendor:publish --provider="Mitake\Laravel\MitakeServiceProvider"