spatie/asset-helper
Laravel 4 helper to generate URLs for revisioned/cache-busted assets. Given an original name like admin.css, it finds the hashed version in your public assets folder and returns a URL such as /assets/admin.0ce5cb43.css.
admin.css → admin.[hash].css) by automating the process.Adopt if:
Look elsewhere if:
spatie/laravel-assets for Laravel 5+).For Executives:
"This package solves a critical but often overlooked issue: ensuring users always get the latest version of our static assets (CSS/JS) without manual cache invalidation. By automating cache-busting with a simple API call (Asset::getUrl('file.css')), we eliminate bugs caused by stale cached files—like outdated styling or broken scripts—while keeping our asset pipeline simple. It’s a low-risk, high-reward fix for a common pain point, especially for Laravel 4 projects. The MIT license and open-source nature mean no vendor lock-in, and the minimal overhead lets us focus on core features."
For Engineering:
*"The spatie/asset-helper package provides a 5-minute solution for Laravel 4’s lack of built-in asset fingerprinting. It appends a random hash to filenames (e.g., admin.css → admin.[hash].css), forcing browsers to fetch updates without manual cache clearing. Key benefits:
Asset::getUrl() in Blade/views.How can I help you explore Laravel packages today?