jacobbennett/pjax
最新稳定版本:v3.0.0
Composer 安装命令:
composer require jacobbennett/pjax
包简介
PJAX for Laravel 5
README 文档
README
Enable the use of PJAX in Laravel 5.*.
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
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.
See an example on Laracasts
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 } });
统计信息
- 总下载量: 42.27k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 116
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-03-10