fduarte42 / zend-expressive-static-files
A PSR-15 middleware that serves static assets for you. Is similar to the "serve-static" npm package.
Installs: 5 176
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: ^7.1
- psr/container: ^1.0
- psr/http-message: ^1.0.1
- psr/http-server-middleware: ^1.0
- zendframework/zend-diactoros: ^1.7.1
- zendframework/zend-stratigility: ^3.0
Requires (Dev)
- phpunit/phpunit: ^7.3
README
A PSR-15 middleware that serves static assets for you
Laminas/Mezzio
Use https://github.com/fduarte42/laminas-static-files for a laminas/mezzio and php 8 compatible version
Example usage:
$app->pipe('/fun-module/assets', new \Fduarte42\StaticFiles\StaticFilesMiddleware( __DIR__ . '/../vendor/fund-module/public', ['publicCachePath' => __DIR__ . '/../public/fun-module/assets'] ));
This is a fork of Serve Static https://github.com/reliv/serve-static