royalmar / laravel-line-notify
There is no license information available for the latest version (1.0.1) of this package.
LINE Notify for laravel
1.0.1
2019-10-30 08:12 UTC
Requires
- php: >=5.6
This package is not auto-updated.
Last update: 2024-11-20 20:57:48 UTC
README
在Laravel實作Line Notify (Notification) 套件
How to install
composer require royalmar/laravel-line-notify
Laravel Setup
Add the service provider to config/app.php:
'providers' => [
...
Royalmar\LineNotify\Providers\LineNotifyServiceProvider::class,
...
Add alias to config/app.php:
'aliases' => [
...
'LineNotify' => Royalmar\LineNotify\Facades\LineNotify::class,
...
Use custom config
php artisan vendor:publish --tag="line_notify_install"
Usage
Send text message
LineNotify::sendMessage('{accessToken}', 'test massage');
Send text message and image
LineNotify::sendMessageAndImage('{accessToken}', 'test massage', [ 'imageThumbnail' => 'https://asnanak.net/site/wp-content/uploads/2012/10/source_27_waves_dark_green-240x240.jpg', 'imageFullsize' => 'https://asnanak.net/site/wp-content/uploads/2012/10/source_27_waves_dark_green-1024x768.jpg' ]);
send text message and sticker
LineNotify::sendMessageAndSticker('{accessToken}', 'test massage', [ 'stickerPackageId' => 1, 'stickerId' => 10 ]);
Limitations are identical to Business Connect API ref: https://developers.line.me/businessconnect/api-reference#sending_message