dev-master
9999999-devA small Laravel4 library to add cachebusting to images. Use the cachebust() helper to get the cachebusted file + timestamp.
The Requires
- php >=5.3.0
- illuminate/support ~4
laravel cache cachebust
A small Laravel4 library to add cachebusting to images. Use the cachebust() helper to get the cachebusted file + timestamp.
This package allows you to use cachebusting helpers for your images. This feature adds an timestamp (modified date) to the file. So the user always will have the latest version of the image. In your .blade files, use the cachebust() method at an imagepath., (*1)
Do not forget to add this in config/app.php under providers:, (*2)
'CeesVanEgmond\Minify\MinifyServiceProvider',
Dont forget to add this in your public/.htaccess to make it work:, (*3)
RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.+)\.(\d+)\.(js|css|png|jpg|gif)$ $1.$3 [L]
You may now use it like this:, (*4)
img src="{{ cachebust('images/image.png') }}">
Or with Blade templating:, (*5)
{{ HTML::image( cachebust('images/image.png') ) }}
Is you have any questions, bugs of comments, mention it in this repository., (*6)
A small Laravel4 library to add cachebusting to images. Use the cachebust() helper to get the cachebusted file + timestamp.
laravel cache cachebust