{"repo":"spatie/laravel-pjax","free":true,"listed":false,"github":"https://github.com/spatie/laravel-pjax","clone":"git clone https://github.com/spatie/laravel-pjax.git","description":"A pjax middleware for Laravel","language":"PHP","stars":510,"topics":["laravel","php","javascript","pjax","performance"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"A pjax middleware for Laravel Pjax is a jQuery plugin that leverages ajax to speed up the loading time of your pages. It works by only fetching specific html fragments from the server, and client-side updating only happens on certain parts of the page. The package provides a middleware that can return the response that the jQuery plugin expects. There's a Vue-PJAX Adapter equivalent by @barnabaskecskes which doesn't require jQuery. Spatie is a webdesign agency based in Antwerp, Belgium. You'll find an overview of all our open source projects on our website. Support us We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products. We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall. Installation You can install the package via composer: Next you must add the \\Spatie\\Pjax\\Middleware\\FilterIfPjax -middleware to the kernel. Usage The provided middleware provides the behaviour that the pjax plugin expects of the server: An X-PJAX request header is set to differentiate a pjax request from normal XHR requests. In this case, if the request is pjax, we skip the layout html and just render the inner contents of the container. Laravel cache busting tip When using Laravel Mix to manage your frontend cache busting, you can use it to your advantage t","default_branch":null,"files":null,"tree":[],"storefront":"/r/spatie","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/spatie/laravel-pjax/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}