PHPackages                             piyapongkaewnan/line-notify - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. piyapongkaewnan/line-notify

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

piyapongkaewnan/line-notify
===========================

PHP and Laravel API for Line application notifications.

3.0(1y ago)164MITPHPPHP ^7.4|^8.0|^8.1

Since Feb 13Pushed 1y agoCompare

[ Source](https://github.com/piyapongkaewnan/line-notify)[ Packagist](https://packagist.org/packages/piyapongkaewnan/line-notify)[ Docs](https://phattarachai.dev)[ RSS](/packages/piyapongkaewnan-line-notify/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (4)Versions (9)Used By (0)

[![Line Notify](/art/line-notify-banner.jpg)](/art/line-notify-banner.jpg)

**The package for Laravel and PHP for Line application notification.**

[![Latest Version](https://camo.githubusercontent.com/f404b9b0317cb46895d1f4a70f26ce3af65bbc0b5fb885dae879e89b638ce6dd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7068617474617261636861692f6c696e652d6e6f746966792e737667)](https://github.com/phattarachai/line-notify/releases)[![Packagist](https://camo.githubusercontent.com/0561ea171d4382b6a1084538c05ed31c41c3a7efc4da00fad0374e089014cda4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7068617474617261636861692f6c696e652d6e6f746966792e737667)](https://github.com/phattarachai/line-notify/releases)[![Maintainability](https://camo.githubusercontent.com/e52f8d413987f5bbcb0059a76a2515c7c2bbe77274576cea8edb182cff8875e5/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f36303062343265313966353638663138643861622f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/phattarachai/line-notify/maintainability)

Line Notify is a package for Laravel and PHP application to easily send notification to Line messaging application users or groups. It builds on top of [Line Notify API](https://notify-bot.line.me/doc/en/), that provides a fluent interface to send messages, images ,and stickers directly to Line service from Laravel and PHP.

 Installing Line Notify
=======================================================================

[](#-installing-line-notify)

You need to use Composer to install Line-Notify into your project:

```
composer require piyapongkaewnan/line-notify

```

Laravel Usage
-------------

[](#laravel-usage)

Add a `LINE_ACCESS_TOKEN` variable to your `.env`. You can get an access token for your application from [Line Notify API](https://notify-bot.line.me/my/)

```
// .env
LINE_ACCESS_TOKEN=#Token Go here#
```

Send a message via Line Notify.

```
use Phattarachai\LineNotify\Facade\Line;

Line::send('message');
```

Send a message with an image.

```
Line::imageUrl('https://lorempixel.com/1024/1024/')
    ->send('message');
```

You can also specify a thumbnail for your image

```
Line::thumbnailUrl('https://lorempixel.com/240/240/')
    ->imageUrl('https://lorempixel.com/1024/1024/')
    ->send('message');
```

You can upload an image from your local path

```
Line::imagePath('/path/to/your/image.png')
    ->send('message');
```

You can combine image uploading and image url together. The uploaded image will take precedence to image url.

```
Line::thumbnailUrl('https://lorempixel.com/240/240/')
    ->imageUrl('https://lorempixel.com/1024/1024/')
    ->imagePath('/path/to/your/image.png')
    ->send('message');
```

Send a message with sticker. You can find a list of Sticker Package ID and Sticker ID here [https://devdocs.line.me/files/sticker\_list.pdf](https://devdocs.line.me/files/sticker_list.pdf)

```
Line::sticker(1, 138)
    ->send('message');
```

Notice that Line require to have a message for each and every request whether you send an image or sticker you still required to provide a message for the API.

###  Publishing the configuration file

[](#-publishing-the-configuration-file)

Alternatively to adding a variable into your `.env`, you can publish `config/line-notify.php` file and add your token there.

Run the following Artisan command in your terminal:

```
php artisan vendor:publish --provider="Phattarachai\LineNotify\LineNotifyServiceProvider"

```

You can set the token in this file.

```
// File: /config/line-notify.php
return [
    'access_token' => env('LINE_ACCESS_TOKEN', null),
];
```

สนับสนุนผู้พัฒนา
----------------

[](#สนับสนุนผู้พัฒนา)

🙋‍♂️ สวัสดีครับ ผมอ๊อฟนะครับ เป็น Full Stack Web Developer มีสร้าง package ขึ้นมาใช้งานในโปรเจคตัวเองที่ใช้งานบ่อย ๆ ถ้ามีข้อเสนอแนะอยากให้ทำ package อะไรบน PHP / Laravel / NodeJS / Python หรือภาษาอื่น ๆ ทักทายมาได้เลยครับ

line: [phat-chai](https://line.me/ti/p/~phat-chai)

💻 รับงาน Freelance หากมีโปรเจคที่น่าสนใจ หาทีมงานร่วมงาน หาโปรแกรมเมอร์ที่มีประสบการณ์ช่วยแก้โจทย์ที่ท้าทาย ติดต่อมาได้เลยครับ ยินดีให้ความช่วยเหลือและรอสร้างผลงานที่ดีร่วมกันครับ

📄 เข้ามาดูประวัติและผลงานได้ที่

[ ![https://phattarachai.dev](/art/phattarachai.dev.png)](https://phattarachai.dev)Configuring (Laravel)
---------------------

[](#configuring-laravel)

###  Laravel 5.5 and newer

[](#-laravel-55-and-newer)

Line Notify wil register itself using Laravel's [Auto Discovery](https://laravel.com/docs/5.5/packages#package-discovery).

###  Laravel 5.4 and older

[](#-laravel-54-and-older)

You'll have to include `LineNotifyServiceProvider` in your `config/app.php`:

```
'providers' => [
    /*
     * Package Service Providers...
     */
    Phattarachai\LineNotify\LineNotifyServiceProvider::class,
]
```

PHP Usage (outside Laravel)
---------------------------

[](#php-usage-outside-laravel)

```
use Phattarachai\LineNotify\Line;

$line = new Line('YOUR-API-TOKEN-HERE');
$line->send('message');
```

Screenshot
----------

[](#screenshot)

[![Screenshot](/art/screenshot.jpg)](/art/screenshot.jpg)

Credit
------

[](#credit)

A project by [phattarachai.dev](https://phattarachai.dev)

If my package make your life easier, please consider:

[Buy me a Coffee](https://ko-fi.com/phattarachai#checkoutModal) |

[Follow Me on Twitter](https://twitter.com/phatchai)

License
-------

[](#license)

The MIT License (MIT)

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 72.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~171 days

Recently: every ~260 days

Total

8

Last Release

715d ago

Major Versions

1.1.3 → 2.02022-02-10

2.1 → 3.02024-05-28

PHP version history (3 changes)1.0PHP ^7.3|^8.0

2.0PHP ^7.4|^8.0

3.0PHP ^7.4|^8.0|^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/0188ed7402694398239b83ed7dbf0c830f9a60c1b248fb8f0826ed03ee2f5367?d=identicon)[mailtopiyapong](/maintainers/mailtopiyapong)

---

Top Contributors

[![phattarachai](https://avatars.githubusercontent.com/u/2162876?v=4)](https://github.com/phattarachai "phattarachai (37 commits)")[![piyapongkaewnan](https://avatars.githubusercontent.com/u/11548595?v=4)](https://github.com/piyapongkaewnan "piyapongkaewnan (14 commits)")

---

Tags

phplaravellineline notifyphattarachai

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/piyapongkaewnan-line-notify/health.svg)

```
[![Health](https://phpackages.com/badges/piyapongkaewnan-line-notify/health.svg)](https://phpackages.com/packages/piyapongkaewnan-line-notify)
```

###  Alternatives

[laravel-notification-channels/telegram

Telegram Notifications Channel for Laravel

1.1k3.4M35](/packages/laravel-notification-channels-telegram)[s-ichikawa/laravel-sendgrid-driver

This library adds a 'sendgrid' mail driver to Laravel.

4139.3M1](/packages/s-ichikawa-laravel-sendgrid-driver)[phattarachai/line-notify

PHP and Laravel API for Line application notification.

1630.9k](/packages/phattarachai-line-notify)[laravel-notification-channels/discord

Laravel notification driver for Discord.

2371.3M11](/packages/laravel-notification-channels-discord)[tzsk/sms

A robust and unified SMS gateway integration package for Laravel, supporting multiple providers.

320244.3k6](/packages/tzsk-sms)[brian2694/laravel-toastr

toastr.js for Laravel

136649.4k5](/packages/brian2694-laravel-toastr)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
