2017 © Pedro Peláez
 

library pjaxer

pjax package for laravel5

image

phpvital/pjaxer

pjax package for laravel5

  • Tuesday, November 22, 2016
  • by Ian Vital
  • Repository
  • 1 Watchers
  • 6 Stars
  • 35 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

laravel-pjax-package

a pjax package for laravel5, include pjax and nprogress, (*1)

一个基于 laravel 5 的 pjax 扩展包 , 本项目基于 NProgress 传送门 和 Pjax., (*2)

使用介绍:Laravel-China传送门|个人博客, (*3)

安装使用详细教程 Installation

使用 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)

使用方法 Usage

加载 pjax 所需要的资源 Load resources

在你的页面插入这条代码, 引入对应的 CSS 和 js 文件:, (*12)

@include('pjax::head')

添加代码: {!! Pjax::pjax() !!} 之后就可以来到页面查看效果啦 :D, (*13)

add @include('pjax::head') and {!! Pjax::pjax() !!} to your page., (*14)

个性化配置 Custom

来到 config/pjax.php 文件, 里面有对应的设置, 目前支持 progress bar 的背景颜色修改以及 snipper 背景颜色的修改., (*15)

configure config/pjax.php to custom background of progress bar or snipper, (*16)

最后

欢迎star , 欢迎 Issue , 欢迎任何学习交流~~, (*17)

License

Laravel-pjax-package is licensed under The MIT License (MIT)., (*18)

The Versions

22/11 2016

dev-master

9999999-dev

pjax package for laravel5

  Sources   Download

MIT

by v1talM

22/11 2016

v2.0

2.0.0.0

pjax package for laravel5

  Sources   Download

MIT

by v1talM

21/11 2016

1.0

1.0.0.0

pjax package for laravel5

  Sources   Download

MIT

by v1talM