New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

torann/laravel-pjax-middleware

Enable the use of PJAX in Laravel.
89 2
Install
composer require torann/laravel-pjax-middleware
Latest Version:0.0.1
PHP:>=5.5.9
Laravel:5
License:BSD-2-Clause
Last Updated:Feb 1, 2018
Links: GitHub  ·  Packagist
Maintainer: torann

Laravel PJAX Middleware

Enable the use of PJAX in Laravel.

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

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

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.

Related Packages

timgws/laravel-pjax

Laravel middleware for pjax. Use ajax and pushState to deliver a fast & seemless...

19 1
jacobbennett/pjax

PJAX for Laravel 5

45,163 114
simonstamm/laravel-pjax

PJAX for Laravel 4 with redirection-support

8,286 22
spatie/laravel-pjax

A pjax middleware for Laravel 5

415,602 513
rcrowe/turbo

Think turbolinks but for your PHP application. Powered by pjax.

3,455 87

Version History

Version Released PHP Laravel License
0.0.1 >=5.5.9 ~5.1 BSD 2-Clause