• Stars
    star
    167
  • Rank 225,967 (Top 5 %)
  • Language
    PHP
  • License
    MIT License
  • Created about 8 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

Laravel / Lumen HTTP/2 Server Push Middleware

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.

More Repositories

1

request-migrations

HTTP Request Migrations for API Versioning like Stripe
PHP
185
star
2

memcached-library

A CodeIgniter Library to Interface with the Memcached cache system
PHP
130
star
3

townhouse

[WORK IN PROGRESS] A Multitenancy package for Laravel that keeps each tenant in a separate database.
PHP
112
star
4

laravel-micro-manager

Oversee jobs you have put into the queue. Track status, completion % and other job information in real time.
PHP
72
star
5

laravel-linkable

URL binding for Laravel models
PHP
25
star
6

fuel-s3

FuelPHP package for the Amazon S3 PHP Class
PHP
23
star
7

fuel-postmark

A driver enabling the postmark email delivery service to be used in conjunction with Fuel
PHP
21
star
8

codeigniter-mongo-logs

Changes the default CodeIgniter Log Library to write to a MongoDB collection instead of flat log files.
PHP
20
star
9

fuel-jobqueue

A job queue & processor for Fuelphp
PHP
12
star
10

fuel-wrench

A simple maintenance package for FuelPHP allowing you to take a site online or offline.
PHP
11
star
11

codeigniter-forrst

A wrapper for the Forrst API using CodeIgniter / PHP
PHP
11
star
12

homebrew-envoy

A homebrew formula to install Laravel's Envoy
Ruby
9
star
13

mozenda-api

Mozenda API Codeigniter Library
PHP
8
star
14

fuel-mongo-crud

A MongoDB CRUD for FuelPHP
6
star
15

fuel-notifications

A notifications system for FuelPHP
PHP
6
star
16

fuel-deploy

Deploy your fuel app in a single command.
PHP
4
star
17

fuel-menu

A set of classes to create nested menus made up of ul/li elements such as the ones in twitter's bootstrap library
PHP
3
star
18

idrac-fan-control

A docker container to control iDRAC fan speeds over IPMI
PHP
3
star
19

dns-over-https

-- WORK IN PROGRESS -- DoH (DNS over HTTPS) Client for PHP / Laravel with support for many providers
PHP
2
star
20

code-style-config

Shared code style configs for my own projects.
1
star