定制 endeavors/pjax 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

endeavors/pjax

Composer 安装命令:

composer require endeavors/pjax

包简介

Service Provider to set headers for a pjax request

README 文档

README

Enable the use of PJAX in Laravel 4.

If using Laravel 5, please see jacobbennett/pjax

Installation

Add endeavors/pjax to require section in your composer.json

composer require endeavors/pjax

Add 'Endeavors\Pjax\PjaxServiceProvider', to your providers array in your app/config/app.php

How to use

This service provider will check, before output 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.

Works great with jquery.pjax.js.

Contribution

I'm open to any idea of features to add to it.

This is almost identical to https://github.com/vtalbot/pjax

I removed the code portion below as I had trouble getting it working. Probably because I didn't have a 'head title'.

$title = $crawler->filter('head title')->html();
			
$response->setContent('<title>' . $title . '</title>' . $html);

统计信息

  • 总下载量: 14
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2015-11-06