PHPackages                             sandulat/laratron - 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. [API Development](/categories/api)
4. /
5. sandulat/laratron

ActiveLibrary[API Development](/categories/api)

sandulat/laratron
=================

Laravel-Rendertron SSR Middleware

v0.1(6y ago)27204[1 PRs](https://github.com/sandulat/laratron/pulls)MITPHPPHP ^7.1

Since Jul 8Pushed 5y ago1 watchersCompare

[ Source](https://github.com/sandulat/laratron)[ Packagist](https://packagist.org/packages/sandulat/laratron)[ Docs](https://github.com/sandulat/laratron)[ RSS](/packages/sandulat-laratron/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (1)Dependencies (6)Versions (2)Used By (0)

Laratron
========

[](#laratron)

🖼Laravel SSR using Rendertron 🖼

[![](https://camo.githubusercontent.com/02325a927d4af28bce8a7f8f6b3d95b629ee15f25d0239aa71150e93198b9c5a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f767072652f73616e64756c61742f6c61726174726f6e2e737667)](https://camo.githubusercontent.com/02325a927d4af28bce8a7f8f6b3d95b629ee15f25d0239aa71150e93198b9c5a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f767072652f73616e64756c61742f6c61726174726f6e2e737667)[![](https://camo.githubusercontent.com/e3d0ffa13c80c7eb1edf308eaf0bf4e15c761c826a0f47facc03f0bb2a66ff86/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f73616e64756c61742f6c61726174726f6e2e737667)](https://camo.githubusercontent.com/e3d0ffa13c80c7eb1edf308eaf0bf4e15c761c826a0f47facc03f0bb2a66ff86/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f73616e64756c61742f6c61726174726f6e2e737667)[ ![](https://camo.githubusercontent.com/5f70c0b0d3c19f4dc3409d2840d1f36f36ccdfeadedbd48be69ed87777bae56f/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f666f6c6c6f772f73616e64756c61742e7376673f7374796c653d736f6369616c)](https://twitter.com/intent/follow?screen_name=sandulat)

About
-----

[](#about)

Since we know that not all crawlers can render Javascript, we have to implement SSR (Server-Side Rendering). Implementing SSR in Laravel may be a headache and the easiest solution could be [Rendertron](https://github.com/GoogleChrome/rendertron).

**Laratron** is a tiny middleware for your Laravel app that detects whether the visitor is a crawler and passes the request to Rendertron.

About Rendertron (from official Readme):

> Rendertron is designed to enable your Progressive Web App (PWA) to serve the correct content to any bot that doesn't render or execute JavaScript. Rendertron runs as a standalone HTTP server. Rendertron renders requested pages using Headless Chrome, auto-detecting when your PWA has completed loading and serializes the response back to the original request. To use Rendertron, your application configures middleware to determine whether to proxy a request to Rendertron. Rendertron is compatible with all client side technologies, including web components.

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

[](#installation)

First of all we need to install Rendertron. Please consult the [official documentation](https://github.com/GoogleChrome/rendertron) for more info. To install Laratron run this inside your project:

```
composer require sandulat/laratron
```

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

[](#configuration)

Laratron exposes only one simple option, the URL of Rendertron, which can be set in your env file:

```
RENDERTRON_URL=http://localhost:3000
```

Usage
-----

[](#usage)

After installation you can use the middleware **`laratron`** on any route that you'd like to be server-side rendered.

```
Route::get('/', function () {
    return view('home');
})->middleware('laratron');
```

Or you can apply it on the entire `web` middleware group in `App\Http\Kernel`:

```
'web' => [
    // ...
    \Sandulat\Laratron\Http\Middleware\LaratronMiddleware::class,
],
```

Credits
-------

[](#credits)

Created by [Stratulat Alexandru](https://twitter.com/sandulat).

[ ![](https://camo.githubusercontent.com/756d7f35cca5ec8d20b05d608c87ff83462bcb262adc26c28d15de98d216e8c4/68747470733a2f2f636f6c746f72617070732e636f6d2f696d616765732f6c6f676f5f7472616e73706172656e742e706e67)](https://coltorapps.com/)

###  Health Score

25

—

LowBetter than 36% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

2549d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/47273575?v=4)[allexxander](/maintainers/allexxander)[@Allexxander](https://github.com/Allexxander)

---

Top Contributors

[![sandulat](https://avatars.githubusercontent.com/u/7345874?v=4)](https://github.com/sandulat "sandulat (6 commits)")

---

Tags

laravellaravel-rendertronlaravel-ssrrendertronssrsandulatlaratron

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/sandulat-laratron/health.svg)

```
[![Health](https://phpackages.com/badges/sandulat-laratron/health.svg)](https://phpackages.com/packages/sandulat-laratron)
```

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.5M923](/packages/statamic-cms)[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[unopim/unopim

UnoPim Laravel PIM

10.5k2.2k](/packages/unopim-unopim)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[simplestats-io/laravel-client

Analytics for Laravel. Track visitors, registrations, and payments. Discover which channels actually drive revenue, not just traffic. Server-side, GDPR compliant, ad-blocker proof.

5019.3k](/packages/simplestats-io-laravel-client)[jasara/php-amzn-selling-partner-api

A fluent interface for Amazon's Selling Partner API in PHP

1348.1k1](/packages/jasara-php-amzn-selling-partner-api)

PHPackages © 2026

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