revolution / laravel-server-push
Laravel Server Push Middleware
Installs: 7 973
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 1
pkg:composer/revolution/laravel-server-push
Requires
- php: ^7.4||^8.0
- ext-json: *
Requires (Dev)
- mockery/mockery: ^1.0
- orchestra/testbench: ^6.0||^7.0
- phpunit/phpunit: ^8.0||^9.0
README
Remake from https://github.com/tomschlick/laravel-http2-server-push
CHANGES
- Support only Laravel mix
- Delete global helpers
- Push only
getrequest andtext/htmlresponse - 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