larry-666 / pjax-for-laravel-5 by larry666
forked from endachao/pjax-for-laravel-5

pjax for laravel 5.*
25
0
2
Package Data
Maintainer Username: larry666
Maintainer Contact: Larry_e@163.com (Larry)
Package Create Date: 2015-11-04
Package Last Update: 2015-11-04
Language: JavaScript
License: MIT
Last Refreshed: 2024-11-22 03:05:30
Package Statistics
Total Downloads: 25
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 0
Total Watchers: 2
Total Forks: 0
Total Open Issues: 0

在 Laravel 5.* 的版本中,使用 Pjax 实现无刷新效果,以及酷炫的进度条

安装

1.在 composer.json 的 require里 加入

"yuanchao/pjax-for-laravel-5":"dev-master" 接着执行 composer update

or

直接执行 composer require "larry666/pjax-for-laravel-5":"dev-master"

2.在config/app.phpproviders 数组添加

Pluigns\Pjax\PjaxServiceProvider::class

3.在 app/Http/Kernel.php$middleware 数组添加

Pluigns\Pjax\PjaxMiddleware::class

4.执行 php artisan vendor:publish 将视图/脚本文件拷贝到相应目录

使用

先引入 jquery.js

布局文件中,插入以下代码

@include('common.pjax',['target'=>'#content'])