PHPackages                             jacobbennett/pjax - 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. jacobbennett/pjax

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

jacobbennett/pjax
=================

PJAX for Laravel 5

v3.0.0(6y ago)11543.4k↓23.5%201MITPHPPHP &gt;=5.4.0

Since Feb 25Pushed 6y ago7 watchersCompare

[ Source](https://github.com/JacobBennett/pjax)[ Packagist](https://packagist.org/packages/jacobbennett/pjax)[ RSS](/packages/jacobbennett-pjax/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (9)Dependencies (2)Versions (11)Used By (1)

PJAX for Laravel 5.\*
=====================

[](#pjax-for-laravel-5)

[![Latest Version on Packagist](https://camo.githubusercontent.com/50bd69018b9a036f6de895fc17aa5c33ba977de7602fb7fdffc4225a2f11faca/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a61636f6262656e6e6574742f706a61782e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jacobbennett/pjax)[![Total Downloads](https://camo.githubusercontent.com/40ea962248b435c48fb04b14e17a027aaa74a9fbe8f3bd87f87b4e5b3dba0ca2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a61636f6262656e6e6574742f706a61782e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jacobbennett/pjax)

Enable the use of PJAX in Laravel 5.\*.

#### Installation

[](#installation)

Add `jacobbennett/pjax` to `require` section in your `composer.json`

```
"jacobbennett/pjax": "~1.0"

```

Add `'JacobBennett\Pjax\PjaxMiddleware',` to `$middleware` in `app/Http/Kernel.php`

#### 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.

jQuery PJAX JS is required to use this package [jquery.pjax.js](https://github.com/defunkt/jquery-pjax).

See an example on [Laracasts](https://laracasts.com/lessons/faster-page-loads-with-pjax)

### Notes:

[](#notes)

Sometimes when using PJAX it will timeout and trigger a standard page reload. This could be due to various factors but one thing you may try is to extend the default timeout for PJAX using this little snippet when you initialize PJAX.

```
$(document).ready(function(){

    // does current browser support PJAX
    if ($.support.pjax) {
    	$.pjax.defaults.timeout = 1000; // time in milliseconds
    }

});
```

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity44

Moderate usage in the ecosystem

Community23

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 60.6% 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 ~204 days

Recently: every ~393 days

Total

10

Last Release

2260d ago

Major Versions

v0.9 → v1.02015-11-20

v1.0.2 → v2.02019-01-16

v2.0 → v3.0.02020-03-10

### Community

Maintainers

![](https://www.gravatar.com/avatar/50837c1464ddeb5a0d132c151fe7cde07e050e67206d50470d92f1e72cc7179e?d=identicon)[JacobBennett](/maintainers/JacobBennett)

---

Top Contributors

[![JacobBennett](https://avatars.githubusercontent.com/u/1517011?v=4)](https://github.com/JacobBennett "JacobBennett (20 commits)")[![simonstamm](https://avatars.githubusercontent.com/u/940371?v=4)](https://github.com/simonstamm "simonstamm (8 commits)")[![vtalbot](https://avatars.githubusercontent.com/u/1474848?v=4)](https://github.com/vtalbot "vtalbot (2 commits)")[![mean-cj](https://avatars.githubusercontent.com/u/1191385?v=4)](https://github.com/mean-cj "mean-cj (1 commits)")[![TopFuel](https://avatars.githubusercontent.com/u/3332131?v=4)](https://github.com/TopFuel "TopFuel (1 commits)")[![wilburpowery](https://avatars.githubusercontent.com/u/15817188?v=4)](https://github.com/wilburpowery "wilburpowery (1 commits)")

---

Tags

laravelphppjaxlaravelpjax

### Embed Badge

![Health badge](/badges/jacobbennett-pjax/health.svg)

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

###  Alternatives

[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[dusterio/link-preview

Link preview generation for PHP with Laravel support

126326.6k3](/packages/dusterio-link-preview)[leantony/laravel-grid

A grid view for laravel, inspired by the yii2 grid widget

9060.2k](/packages/leantony-laravel-grid)[visuellverstehen/statamic-classify

A useful helper to add CSS classes to all HTML tags generated by the bard editor.

20116.8k](/packages/visuellverstehen-statamic-classify)[simonstamm/laravel-pjax

PJAX for Laravel 4 with redirection-support

238.3k](/packages/simonstamm-laravel-pjax)[madeitbelgium/wappalyzer

PHP Library that uncovers the technologies used on websites.

1417.5k](/packages/madeitbelgium-wappalyzer)

PHPackages © 2026

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