1. Go to this page and download the library: Download mesak/laravel-linebot 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/ */
mesak / laravel-linebot example snippets
'listener' => 'App\Listeners\LineBotListener',
use Illuminate\Http\Request;
Route::post('/line', function (Request $request) {
return \Facades\Mesak\LineBot\Contracts\Bot::handle($request);
});
namespace App\Services\LineBot;
use Mesak\LineBot\EntityBot as BaseEntityBot;
use Mesak\LineBot\Contracts\Bot as BotContract;
class EntityBot extends BaseEntityBot implements BotContract
{
//do something...
}