2017 © Pedro Peláez
 

library cachebust

A small Laravel4 library to add cachebusting to images. Use the cachebust() helper to get the cachebusted file + timestamp.

image

ceesvanegmond/cachebust

A small Laravel4 library to add cachebusting to images. Use the cachebust() helper to get the cachebusted file + timestamp.

  • Tuesday, December 3, 2013
  • by ceesvanegmond
  • Repository
  • 0 Watchers
  • 0 Stars
  • 247 Installations
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

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., (*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)

The Versions

03/12 2013

dev-master

9999999-dev

A small Laravel4 library to add cachebusting to images. Use the cachebust() helper to get the cachebusted file + timestamp.

  Sources   Download

The Requires

 

laravel cache cachebust