承接 tomschlick/laravel-http2-server-push 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

tomschlick/laravel-http2-server-push

最新稳定版本:v0.2.1

Composer 安装命令:

composer require tomschlick/laravel-http2-server-push

包简介

A middleware package for Laravel to enable server push for your script, style, and image assets.

README 文档

README

Build Status StyleCI Latest Stable Version Total Downloads Latest Unstable Version License

A middleware package for Laravel 5 / Lumen to enable server push for your script, style, and image assets.

Installation

First start by adding the package to your composer.json file

composer require tomschlick/laravel-http2-server-push

Next add the service provider to your config/app.php file:

\TomSchlick\ServerPush\ServiceProvider::class,

Then add the middleware to your Http Kernel (app/Http/Kernel.php). Do so towards the end of the list.

protected $middleware = [
    \TomSchlick\ServerPush\Http2ServerPushMiddleware::class,
];

Usage

Now when you enable it on a route it will automatically include the resources in your elixir /build/rev-manifest.json file. To add a resource manually you may use pushStyle($pathOfCssFile), pushScript($pathOfJsFile), pushFont($pathOfFontFile) or pushImage($pathOfImageFile) from anywhere in your project.

统计信息

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

GitHub 信息

  • Stars: 166
  • Watchers: 4
  • Forks: 19
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-07-28