LaravelPackages.net
Acme Inc.
Toggle sidebar
vanchaiy/line-sdk-php

LineBot & LineNotify SDK for Php pure & support laravel

16
0
1.0.3
About vanchaiy/line-sdk-php

vanchaiy/line-sdk-php is a Laravel package for linebot & linenotify sdk for php pure & support laravel. It currently has 0 GitHub stars and 16 downloads on Packagist (latest version 1.0.3). Install it with composer require vanchaiy/line-sdk-php. Discover more Laravel packages by vanchaiy or browse all Laravel packages to compare alternatives.

Last updated

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

Star History Chart