revolution/laravel-line-sdk
LINE SDK for Laravel
40,046
22
| Install | |
|---|---|
composer require revolution/laravel-line-sdk |
|
| Latest Version: | 4.2.0 |
| PHP: | ^8.3 |
| License: | MIT |
| Last Updated: | Jul 27, 2026 |
| Links: | GitHub · Packagist |
Maintainer: revolution
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
guanguans/laravel-exception-notify
Monitor exception and report to the notification channels(Log、Mail、AnPush、Bar...
48,882
149
anpush
bark
bot
chanify
dingtalk
discord
email
error
exception
gitter
googlechat
igot
laravel
lark
log
logger
mail
mattermost
microsoftteams
monitor
notification
notifier
notify
nowpush
ntfy
push
pushback
pushbullet
pushdeer
pushme
pushover
pushplus
qq
qq 频道机器人
rocketchat
sdk
serverchan
server酱
showdocpush
simplepush
slack
telegram
wework
wpush
xizhi
yifengchuanhua
zohocliq
zohocliqwebhook
zulip
一封传话
企业微信
企业微信群机器人
微信
息知
钉钉
钉钉群机器人
飞书
飞书群机器人
jaybizzle/laravel-crawler-detect
A Laravel package to detect web crawlers via the user agent
2,899,946
326
aws/aws-sdk-php-laravel
A simple Laravel 9/10/11/12/13 service provider for including the AWS SDK for PH...
40,458,060
1,716