Skip to content

vanchaiy/line-sdk-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LineSDK for PHP

LineBot & LineNotify SDK for Pure PHP & Support Laravel


INSTALLATION

Run Composer in your project:

composer require vanchaiy/line-sdk-php

Then you could use SDK class after Composer is loaded on your PHP project:

require __DIR__ . '/vendor/autoload.php';

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

OR

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

Laravel Configuration

.env

LINE_BOT_CHANNEL_ID=
LINE_BOT_CHANNEL_SECRET=
LINE_BOT_CHANNEL_TOKEN=

LINE_NOTIFY_TOKEN=

config/app.php

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

Run the following Artisan command in your terminal:

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

Test

use LineBot;

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

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

Documents

About

LineBot & LineNotify SDK for Php pure & support laravel

Resources

Stars

0 stars

Watchers

1 watching

Forks

Packages

 
 
 

Contributors

Languages