PHPackages                             bnussbau/laravel-trmnl - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. bnussbau/laravel-trmnl

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

bnussbau/laravel-trmnl
======================

Develop TRMNL plugins with Laravel

2.3.0(2mo ago)501.6k↑227.8%3MITPHPPHP ^8.2CI passing

Since Feb 5Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/bnussbau/laravel-trmnl)[ Packagist](https://packagist.org/packages/bnussbau/laravel-trmnl)[ Docs](https://github.com/bnussbau/laravel-trmnl)[ Fund](https://www.buymeacoffee.com/bnussbau)[ Fund](https://trmnl.com/?ref=laravel-trmnl)[ RSS](/packages/bnussbau-laravel-trmnl/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (10)Dependencies (28)Versions (18)Used By (0)

Laravel TRMNL - Develop TRMNL plugins with Laravel
==================================================

[](#laravel-trmnl---develop-trmnl-plugins-with-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/f049cf4bdf7d1de8837f50f6c0e5b37cf7ddb34b93b0201686068227921d9be7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f626e7573736261752f6c61726176656c2d74726d6e6c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/bnussbau/laravel-trmnl)[![GitHub Tests Action Status](https://camo.githubusercontent.com/28ced115ea844de145aeb65366012be6525c666151489492f81665452d81c3e1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f626e7573736261752f6c61726176656c2d74726d6e6c2f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/bnussbau/laravel-trmnl/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/2065e7f1fdff29c1b7231a18b3ae4c134391e725f6193c8a155e7e965bf6bbd8/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f626e7573736261752f6c61726176656c2d74726d6e6c2f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/bnussbau/laravel-trmnl/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/5fc901544639c0c831175511a36abef1bfd22e7e2e8bc045d157484ba36ba4f4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f626e7573736261752f6c61726176656c2d74726d6e6c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/bnussbau/laravel-trmnl)

Laravel TRMNL is a package designed to streamline the development of both public and private plugins for the [TRMNL](https://trmnl.com/?ref=laravel-trmnl) E-ink device. It supports data updates via webhooks or polling. For public plugins, it also provides built-in support for the TRMNL OAuth flow. Additionally, UI prototyping is made easier with the included Blade components.

If you are looking for a Laravel based

- TRMNL **Server implementation**, check out this repo: [usetrmnl/larapaper](https://github.com/usetrmnl/larapaper)
- **Blade Components** on top of the TRMNL Design System, check out this repo: [bnussbau/laravel-trmnl-blade](https://github.com/bnussbau/laravel-trmnl-blade)
- streamlined package that converts HTML content (or images) into optimized images for e-paper devices: [bnussbau/epaper-pipeline-php](https://github.com/bnussbau/epaper-pipeline-php)

[![Screenshot](readme-screenshot.png)](readme-screenshot.png)

Support ❤️
----------

[](#support-️)

Support the development of this package by purchasing a TRMNL device through our referral link: . At checkout, use the code `laravel-trmnl` to receive a $15 **discount** on your purchase.

### Plugins built with Laravel TRMNL

[](#plugins-built-with-laravel-trmnl)

- [trmnl-train-monitor](https://github.com/bnussbau/trmnl-train-monitor) by @bnussbau

Features
--------

[](#features)

- 🔌 Public and private plugin support [(docs)](https://help.trmnl.com/en/articles/10122094-plugin-recipes), [(docs)](https://docs.trmnl.com/go/plugin-marketplace/introduction)
- 🔄 Support for updates via webhooks or polling [(docs)](https://help.trmnl.com/en/articles/9510536-private-plugins)
- 🎨 Blade Components on top of the TRMNL Design System [(docs)](https://trmnl.com/framework)
- 🎯 OAuth integration support for public plugins [(docs)](https://docs.trmnl.com/go/plugin-marketplace/plugin-installation-flow)
- 📱 Render Helpers for responsive layouts

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require bnussbau/laravel-trmnl
```

### Optional Steps

[](#optional-steps)

#### Publish Config

[](#publish-config)

Optionally, publish the config file using:

```
php artisan vendor:publish --tag="trmnl-config"
```

#### Publish Views

[](#publish-views)

Optionally, publish the views using:

```
php artisan vendor:publish --tag="trmnl-views"
```

Configuration
-------------

[](#configuration)

### Default Environment Variables

[](#default-environment-variables)

The package can be configured through environment variables:

```
TRMNL_PLUGIN_TYPE=              # private | public
TRMNL_DATA_STRATEGY=            # polling | webhook
TRMNL_WEBHOOK_URL=              # grab from TRMNL Dashboard [Private Plugins]
TRMNL_OAUTH_CLIENT_ID=          # grab from TRMNL Dashboard [Public Plugins]
TRMNL_OAUTH_CLIENT_SECRET=      # grab from TRMNL Dashboard [Public Plugins]
```

Plugin Development
------------------

[](#plugin-development)

Private Plugins
---------------

[](#private-plugins)

By default, plugins are private. To configure your settings, add the following environment variables to your `.env` file:

```
TRMNL_PLUGIN_TYPE=private
TRMNL_DATA_STRATEGY=webhook # or polling
TRMNL_WEBHOOK_URL=          # grab from TRMNL Dashboard if using webhook
```

### Update Data

[](#update-data)

Laravel TRMNL provides the `UpdateScreenContentJob` to facilitate sending data updates to TRMNL servers.

#### Example usage

[](#example-usage)

```
UpdateScreenContentJob::dispatchSync([
    'key' => 'value',
    // ... other variables
]);
```

### Example using a Model and Pagination

[](#example-using-a-model-and-pagination)

```
UpdateScreenContentJob::dispatchSync(
    Journey::whereNotIn('track', [1, 2])
        ->whereBetween('timestamp_planned', [now()->setTimezone('Europe/Vienna')
            ->addMinutes(15), now()->setTimezone('Europe/Vienna')->addHours(2)])
        ->paginate(8)
        ->toArray()
);
```

Use the markup editor on the TRMNL private plugin webapp or use the `stripMarkup()` Method on the `Trmnl`Facade to render markup which you can copy into the editor. See Section Blade Components.

Public Plugins
--------------

[](#public-plugins)

Refer to the [“Plugin Marketplace” section](https://docs.trmnl.com/go/plugin-marketplace/introduction) in the TRMNL documentation, paying close attention to the authentication flow. Always verify the authorization token for incoming requests to prevent security issues. You can use `Auth::guard('trmnl')` to verify.

### Configuration

[](#configuration-1)

```
TRMNL_PLUGIN_TYPE=public
TRMNL_OAUTH_CLIENT_ID=          # grab from TRMNL Dashboard
TRMNL_OAUTH_CLIENT_SECRET=      # grab from TRMNL Dashboard
```

### Publish &amp; Run Migrations

[](#publish--run-migrations)

Publishes the database table required for storing authentication data.

```
php artisan vendor:publish --tag="trmnl-migrations"
php artisan migrate
```

### Render Markup

[](#render-markup)

Public plugins need to provide a render endpoint, which returns markup for all screen layouts. You can use the `Trmnl::renderScreen()` as helper.

```
Route::post('/render', function () {

    // validate Authorization
    if (! Auth::guard('trmnl')->validate()) {
        return response()->json(['error' => 'Unauthorized'], 401);
    }

    return response()->json(
        Trmnl::renderScreen(
            'trmnl.full',
            'trmnl.half_horizontal',
            'trmnl.half_vertical',
            'trmnl.quadrant'
        )
    );
})->name('trmnl.render');
// make sure to not verify CSRF Token for this route
// ->withoutMiddleware([Illuminate\Foundation\Http\Middleware\VerifyCsrfToken::class])
```

Publish
-------

[](#publish)

Run command `php artisan trmnl:plugin:configuration` to print the URLs required for plugin submission.

Blade Components
----------------

[](#blade-components)

- [see TRMNL Design System](https://trmnl.com/framework)
- [resources/views/components](https://github.com/bnussbau/laravel-trmnl-blade/tree/main/resources/views/components)

Blade Compontens can help you generate markup code. Alternatively you can just use the native CSS classes from the TRMNL Design System.

### Usage

[](#usage)

### Basic Layout

[](#basic-layout)

```

```

### Quote Example

[](#quote-example)

```

            Motivational Quote
            “I love inside jokes. I hope to be a part of one someday.”
            Michael Scott

```

Testing
-------

[](#testing)

```
composer test
```

Credits
-------

[](#credits)

- [Benjamin Nussbaum](https://github.com/bnussbau)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance89

Actively maintained with recent releases

Popularity33

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75.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 ~27 days

Recently: every ~56 days

Total

17

Last Release

61d ago

Major Versions

0.1.4 → 1.0.02025-06-04

1.1.0 → 2.0.02025-09-14

### Community

Maintainers

![](https://www.gravatar.com/avatar/53653f306f20e3e075f9d9243a1daa101ae2f0f7fbd82329793e8e5acba6afba?d=identicon)[bnussbau](/maintainers/bnussbau)

---

Top Contributors

[![bnussbau](https://avatars.githubusercontent.com/u/8931007?v=4)](https://github.com/bnussbau "bnussbau (75 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (17 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (7 commits)")

---

Tags

laravellaravel-packageplugin-developmenttrmnllaravelBenjamin NussbaumTRMNL

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/bnussbau-laravel-trmnl/health.svg)

```
[![Health](https://phpackages.com/badges/bnussbau-laravel-trmnl/health.svg)](https://phpackages.com/packages/bnussbau-laravel-trmnl)
```

###  Alternatives

[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.3M42](/packages/spatie-laravel-pdf)[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

328482.0k25](/packages/codewithdennis-filament-select-tree)[nativephp/desktop

NativePHP for Desktop

38133.6k8](/packages/nativephp-desktop)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

124581.3k](/packages/worksome-exchange)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3913.7k](/packages/rawilk-profile-filament-plugin)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

63105.4k2](/packages/hydrat-filament-table-layout-toggle)

PHPackages © 2026

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