PHPackages                             hampus/stack-static-file - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. hampus/stack-static-file

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

hampus/stack-static-file
========================

A PHP port of Rack::Static.

0.1.0(12y ago)2401MITPHPPHP &gt;=5.3.0

Since Mar 17Pushed 12y agoCompare

[ Source](https://github.com/ckhampus/StackStaticFile)[ Packagist](https://packagist.org/packages/hampus/stack-static-file)[ RSS](/packages/hampus-stack-static-file/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (5)Versions (3)Used By (1)

Stack::StaticFile
=================

[](#stackstaticfile)

This is a PHP port of the Rack::Static middleware.

The middleware intercepts requests for static files (javascript files, images, stylesheets, etc) based on the url prefixes or route mappings passed in the options.

Usage
-----

[](#usage)

Wrap your HttpKernelInterface app in an instance of `Hampus\Stack\StaticFile` or add it to your middleware stack.

With [stack/builder](https://github.com/stackphp/builder):

```
