PHP code example of listen / ali-openapi

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

    

listen / ali-openapi example snippets


providers => [
    ......
    Listen\AliOpenapi\AliOpenapiServiceProvider::class,
],

......

aliases => [
    ......
    'AliOpenapi' => Listen\AliOpenapi\Facades\AliOpenapi::class,
] 

dd(AliOpenapi::getToken());

\AliOpenapi::pushExceptionCallback('dingtalk', function ($module, $message, $code, $otherParams) {
            // https://github.com/listen-rain/dingtalk
            sendByDingtalk($message . "\n\n Code: {$code}", "{$module}.error");
        });
bash
php artisan publish