PHPackages                             phattarachai/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. phattarachai/line-notify

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

phattarachai/line-notify
========================

PHP and Laravel API for Line application notification.

2.0.4(3y ago)1630.9k↓21.1%7MITPHPPHP ^7.4|^8.0

Since Feb 13Pushed 2y ago1 watchersCompare

[ Source](https://github.com/phattarachai/line-notify)[ Packagist](https://packagist.org/packages/phattarachai/line-notify)[ Docs](https://phattarachai.dev)[ GitHub Sponsors](https://github.com/[user1)[ GitHub Sponsors]()[ RSS](/packages/phattarachai-line-notify/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (9)Dependencies (3)Versions (10)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 phattarachai/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');
```

You can use setToken() to specify other ACCESS\_TOKEN you want to use beside from the .env.

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

Line::setToken(/*...access token */)
    ->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'),
];
```

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)

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

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

🙋‍♂️ สวัสดีครับ ผมอ๊อฟนะครับ เป็น 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)License
-------

[](#license)

The MIT License (MIT)

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity37

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 97.8% 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 ~81 days

Recently: every ~71 days

Total

9

Last Release

1274d ago

Major Versions

1.1.3 → 2.02022-02-10

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

2.0PHP ^7.4|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/e0c26146c11d937355b3e1e6b2f83dbe74320e51623dfde506a6e460077e789a?d=identicon)[phatchai](/maintainers/phatchai)

---

Top Contributors

[![phattarachai](https://avatars.githubusercontent.com/u/2162876?v=4)](https://github.com/phattarachai "phattarachai (45 commits)")[![hms5232](https://avatars.githubusercontent.com/u/43672033?v=4)](https://github.com/hms5232 "hms5232 (1 commits)")

---

Tags

laravellinenotificationphpphplaravellineline notifyphattarachai

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[ferdous/laravel-otp-validate

Laravel package for OTP validation with built-in features like retry and resend mechanism. Built in max retry and max resend blocking. OTP/Security Code can be send over SMS or Email of your choice with user-defined template.

7124.4k](/packages/ferdous-laravel-otp-validate)[biegalski-llc/laravel-mailgun-webhooks

This package allows you to quick and easily integrate your Laravel application with Mailgun Webhooks thus allowing you to track the outgoing email status for each individual user. There is also an optional feature to receive alerts for specific mailgun events such as spam complaints and sending failuresgit .

2389.2k](/packages/biegalski-llc-laravel-mailgun-webhooks)[djunehor/laravel-sms

Send SMS from your laravel application

385.3k1](/packages/djunehor-laravel-sms)[martian/spammailchecker

A laravel package that protect users from entering non-existing/spam email addresses.

422.0k](/packages/martian-spammailchecker)[usamamuneerchaudhary/filament-notifier

A powerful notification system for FilamentPHP that handles multi-channel notifications with template management, scheduling, and real-time delivery. Built for developers who need enterprise-grade notifications without the complexity.

321.1k](/packages/usamamuneerchaudhary-filament-notifier)

PHPackages © 2026

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