pjax package for laravel5
a pjax package for laravel5, include pjax and nprogress, (*1)
一个基于 laravel 5 的 pjax 扩展包 , 本项目基于 NProgress 传送门 和 Pjax., (*2)
使用介绍:Laravel-China传送门|个人博客, (*3)
使用 Composer 引入:, (*4)
composer require phpvital/pjaxer
打开 app/Http/Kernel.php
文件, 在 $middleware
数组里面添加中间件:, (*5)
\Vital\Pjaxer\Middlewares\PjaxMiddleware::class,
add \Vital\Pjaxer\Middlewares\PjaxMiddleware::class,
to $middleware
in app/Http/Kernel.php
, (*6)
打开 config/app.php
文件, 在 providers
数组里面注册服务:, (*7)
Vital\Pjaxer\Providers\PjaxServiceProvider::class,
add Vital\Pjaxer\Providers\PjaxServiceProvider::class,
to providers
in config/app.php
, (*8)
在下面的 aliases
数组里面注册门面 Facade :, (*9)
'Pjax' => \Vital\Pjaxer\Facades\PjaxFacade::class,
add 'Pjax' => \Vital\Pjaxer\Facades\PjaxFacade::class,
to aliases
, (*10)
执行命令 php artisan vendor:publish
之后会在 config
目录下生成一个 pjax.php
文件, 这个文件用来进行pjax配置;, (*11)
在你的页面插入这条代码, 引入对应的 CSS 和 js 文件:, (*12)
@include('pjax::head')
添加代码: {!! Pjax::pjax() !!}
之后就可以来到页面查看效果啦 :D, (*13)
add @include('pjax::head')
and {!! Pjax::pjax() !!}
to your page., (*14)
来到 config/pjax.php
文件, 里面有对应的设置, 目前支持 progress bar 的背景颜色修改以及 snipper 背景颜色的修改., (*15)
configure config/pjax.php
to custom background of progress bar or snipper, (*16)
欢迎star , 欢迎 Issue , 欢迎任何学习交流~~, (*17)
Laravel-pjax-package is licensed under The MIT License (MIT)., (*18)