revolution/laravel-server-push

This package is abandoned and no longer maintained. No replacement package was suggested.

Laravel Server Push Middleware

1.3.0 2022-03-12 06:11 UTC

This package is auto-updated.

Last update: 2022-08-22 02:07:05 UTC


README

tests Maintainability Test Coverage

Remake from https://github.com/tomschlick/laravel-http2-server-push

CHANGES

  • Support only Laravel mix
  • Delete global helpers
  • Push only get request and text/html response
  • Compatible with config/server-push.php

Requirements

  • PHP >= 7.4
  • Laravel >= 6.0

Installation

composer require revolution/laravel-server-push

Publish config file (Optional)

php artisan vendor:publish --tag=server-push-config

Add to web middleware group

protected $middlewareGroups = [
        'web' => [
            //...
            \Revolution\ServerPush\ServerPush::class,
        ],

Instead of global helpers

use Revolution\ServerPush\LinkBuilder;

app(LinkBuilder::class)->addLink('/image/test.jpg')->addLink('/css/test.css');

LICENSE

MIT
Copyright kawax