PHP code example of bright-tech / laravel-wechat-service

1. Go to this page and download the library: Download bright-tech/laravel-wechat-service 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/ */

    

bright-tech / laravel-wechat-service example snippets


'providers' => [
    ...
    bright_tech\laravel\wechat\WechatServiceProvider::class,
]

'aliases' => [
    ...
    'Wechat' => bright_tech\laravel\wechat\WechatServiceFacade::class,
]

    public function getWechat( WechatService $wechatService ){
    ...
    }

    $wechatService->getAccessToken()

    $wechatService->getWechatClient()->sendTemplateMessage(...);

php artisan vendor:publish