revolution/laravel-line-sdk
| Install | |
|---|---|
composer require revolution/laravel-line-sdk |
|
| Latest Version: | 4.2.0 |
| PHP: | ^8.3 |
| License: | MIT |
| Last Updated: | Sep 28, 2026 |
| Links: | GitHub · Packagist |
LINE SDK for Laravel
Features
- Working with Laravel Event System. Including Webhook routing and controller.
- Extensible Bot Client.
- Working with Laravel Notification System(LINE Messaging API)
- Including Socialite drivers(LINE Login)
Requirements
- PHP >= 8.3
- Laravel >= 12.0
Installation
composer require revolution/laravel-line-sdk
Uninstall
composer remove revolution/laravel-line-sdk
- Delete related files. See below.
Configuration
.env
Set up in LINE Developers console. https://developers.line.biz/
Note: You can no longer create a Messaging API channel directly from the LINE Developers Console. To create a Messaging API channel, first create a LINE Official Account using the [Create LINE Official Account] button. Then, enable Messaging API usage from the LINE Official Account Manager.
Create two channels Messaging API and LINE Login.
- Messaging API : Get
Channel access token (long-lived)andChannel secret. SetWebhook URL - LINE Login : Get
Channel IDandChannel secret. SetCallback URL
LINE_BOT_CHANNEL_TOKEN=
LINE_BOT_CHANNEL_SECRET=
LINE_LOGIN_CLIENT_ID=
LINE_LOGIN_CLIENT_SECRET=
LINE_LOGIN_REDIRECT=
Publishing(Optional)
php artisan vendor:publish --tag=line-config
Quick Start
Prepare
- Create
Messaging APIchannel in LINE Developers console. - Get
Channel access token (long-lived),Channel secretand QR code. - A web server that can receive webhooks from LINE. Not possible on a normal local server.
Create new Laravel project
laravel new line-bot
cd ./line-bot
composer require revolution/laravel-line-sdk
Edit .env
LINE_BOT_CHANNEL_TOKEN=
LINE_BOT_CHANNEL_SECRET=
Publishing Listeners
php artisan vendor:publish --tag=line-listeners
Deploy to web server
- Set
Webhook URLin LINE Developers console.https://example.com/line/webhook - Verify Webhook URL.
Add bot as a friend.
- Using QR code.
Send test message
Bot returns same message.
Documents
Demo
https://github.com/invokable/laravel-line-project
LICENSE
MIT
Related Packages
Monitor exception and report to the notification channels(Log、Mail、AnPush、Bar...
Push notification SDK(AnPush、Bark、Chanify、DingTalk、Discord、Gitter、GoogleCh...
Powerful PHP library/framework for VK API bots, supporting LongPoll & Callback &...
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 4.2.0 | ^8.3 | ^12.0| | MIT | |
| 4.1.0 | ^8.2 | ^11.0| | MIT | |
| 4.0.1 | ^8.2 | ^11.0| | MIT | |
| 4.0.0 | ^8.2 | ^11.0| | MIT | |
| 3.5.0 | ^8.1 | ^10.0| | MIT | |
| 3.4.0 | ^8.1 | ^10.0| | MIT | |
| 3.3.8 | ^8.1 | ^10.0| | MIT | |
| 3.3.7 | ^8.1 | ^10.0| | MIT | |
| 3.3.6 | ^8.1 | ^10.0| | MIT | |
| 3.3.5 | ^8.1 | ^10.0| | MIT | |
| 3.3.4 | ^8.1 | ^10.0| | MIT | |
| 3.3.3 | ^8.1 | ^10.0| | MIT | |
| 3.3.2 | ^8.1 | ^10.0| | MIT | |
| 3.3.1 | ^8.1 | ^10.0| | MIT | |
| 3.3.0 | ^8.1 | ^10.0| | MIT | |
| 3.2.5 | ^8.1 | ^10.0| | MIT | |
| 3.2.4 | ^8.1 | ^10.0| | MIT | |
| 3.2.3 | ^8.1 | ^10.0| | MIT | |
| 3.2.2 | ^8.1 | ^10.0| | MIT | |
| 3.2.1 | ^8.1 | ^10.0| | MIT | |
| 3.2.0 | ^8.1 | ^10.0| | MIT | |
| 3.1.0 | ^8.0 | ^9.0| | MIT | |
| 3.0.1 | ^8.0 | ^9.0| | MIT | |
| 3.0.0 | ^8.0 | ^9.0| | MIT | |
| 2.2.5 | ^8.0 | ^9.0| | MIT | |
| 2.2.4 | ^8.0 | ^9.0| | MIT | |
| 2.2.3 | ^8.0 | ^9.0| | MIT | |
| 2.2.2 | ^8.0 | ^9.0| | MIT | |
| 2.2.1 | ^8.0 | ^9.0| | MIT | |
| 2.2.0 | ^8.0 | ^9.0| | MIT |
Showing the latest 30 of 59. See every release on Packagist