08/01
2018
Wallogit.com
2017 © Pedro Peláez
Automatic asset url version postfix
composer require iankov/asset-v
Publish config file, (*1)
php artisan vendor:publish --tag=assetv_config
Run console command to find file modifications and update file version number. Every time file changes it will get a version number incremented by 1, (*2)
php artisan assetv:update
Use it just as regular asset() function in your laravel application, (*3)
<script src="{{ asset_v('/js/app.js') }}"></script>
It will make a url with version tail like this, (*4)
<script src="http://example.com/js/app.js?v2"></script>