Skip to content
This repository has been archived by the owner on Mar 19, 2023. It is now read-only.

ceesvanegmond/laravel4-cachebust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cachebusting package for Laravel 4

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.

Do not forget to add this in config/app.php under providers:

  	'CeesVanEgmond\Minify\MinifyServiceProvider',

Dont forget to add this in your public/.htaccess to make it work:

  
    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:

  img src="{{ cachebust('images/image.png') }}">
 

Or with Blade templating:

  	{{ HTML::image( cachebust('images/image.png') ) }}
 

Is you have any questions, bugs of comments, mention it in this repository.

About

Cachebusting package for Laravel 4.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages