Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

eriktobben's avatar

Simple Asset Cache Busting

Hi,

Is there an easy way to version static assets without using Mix? All I want is to bust file cache when I do updates to css og js files. I have found some packages where I can run an Artisan command to generate a new hash. The problem with these packages is that I have to alter the nginx rewrite rules, and I was hoping not to do that.

0 likes
1 reply
aurawindsurfing's avatar

@eriktobben what is wrong with using mix

.version()

It does exactly what you describe. You can always try to generate new symlink with a random name and place it in your root template but what is the point of inventing the wheel here?

Please or to participate in this conversation.