PHPackages                             torann/laravel-pjax-middleware - 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. torann/laravel-pjax-middleware

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

torann/laravel-pjax-middleware
==============================

Enable the use of PJAX in Laravel.

0.0.1(10y ago)2891[1 issues](https://github.com/Torann/laravel-pjax-middleware/issues)BSD 2-ClausePHPPHP &gt;=5.5.9

Since Aug 5Pushed 8y ago1 watchersCompare

[ Source](https://github.com/Torann/laravel-pjax-middleware)[ Packagist](https://packagist.org/packages/torann/laravel-pjax-middleware)[ RSS](/packages/torann-laravel-pjax-middleware/feed)WikiDiscussions master Synced today

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

Laravel PJAX Middleware
=======================

[](#laravel-pjax-middleware)

Enable the use of PJAX in Laravel.

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

[](#installation)

Install using composer:

```
$ composer require torann/laravel-pjax-middleware

```

You'll then need to run `composer install` to download it and have the autoloader updated.

### Setup

[](#setup)

Once installed you need to append the middleware class within the Http kernel. Open up `app/Http/Kernel.php` and find the `$middleware` variable.

```
protected $middleware = [

    Torann\Pjax\PjaxMiddleware::class,

]
```

#### How to use

[](#how-to-use)

This middleware will check, before outputting the http response, for the `X-PJAX`'s header in the request. If found, it will crawl the response to return the requested element defined by `X-PJAX-Container`'s header.

Works great with [flight-with-pjax](https://github.com/Torann/flight-with-pjax) and [jquery.pjax.js](https://github.com/defunkt/jquery-pjax).

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity48

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

3986d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1406755?v=4)[Daniel Stainback](/maintainers/torann)[@Torann](https://github.com/Torann)

---

Top Contributors

[![Torann](https://avatars.githubusercontent.com/u/1406755?v=4)](https://github.com/Torann "Torann (3 commits)")

---

Tags

laravelflightpjaxflightjspushStatepopstate

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/torann-laravel-pjax-middleware/health.svg)

```
[![Health](https://phpackages.com/badges/torann-laravel-pjax-middleware/health.svg)](https://phpackages.com/packages/torann-laravel-pjax-middleware)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M11](/packages/renatomarinho-laravel-page-speed)[vinkius-labs/laravel-page-speed

Laravel Page Speed

2.5k12.5k1](/packages/vinkius-labs-laravel-page-speed)[emargareten/inertia-modal

Inertia Modal is a Laravel package that lets you implement backend-driven modal dialogs for Inertia apps.

90142.9k](/packages/emargareten-inertia-modal)

PHPackages © 2026

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