torann/laravel-pjax-middleware is a Laravel package for enable the use of pjax in laravel..
It currently has 2 GitHub stars and 89 downloads on Packagist (latest version 0.0.1).
Install it with composer require torann/laravel-pjax-middleware.
Discover more Laravel packages by torann
or browse all Laravel packages to compare alternatives.
Last updated
Enable the use of PJAX in Laravel.
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.
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,
]
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 and jquery.pjax.js.