PHP code example of vanchaiy / line-sdk-php

1. Go to this page and download the library: Download vanchaiy/line-sdk-php 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/ */

    

vanchaiy / line-sdk-php example snippets




$lineNotify = new LineSDK\Bot();
$lineNotify = new LineSDK\Notify();

use LineSDK\Bot();
use LineSDK\Notify();

    'providers' => [
        LineSDK\Laravel\LineServiceProvider::class,
    ],

    'aliases' => [
        'LineBot' => LineSDK\Laravel\Facades\LineBot::class,
        'LineNotify' => LineSDK\Laravel\Facades\LineNotify::class,
    ],

use LineBot;

LineBot::push('<userToken>')->text('LineBot Test');

use LineNotify;

LineNotify::sent()->text('LineNotify Test');

php artisan vendor:publish --provider="LineSDK\Laravel\LineServiceProvider"