composer require iankov/asset-v
Publish config file
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
php artisan assetv:update
Use it just as regular asset()
function in your laravel application
<script src="{{ asset_v('/js/app.js') }}"></script>
It will make a url with version tail like this
<script src="http://example.com/js/app.js?v2"></script>