// To access laravel assets
asset('sp-icon/Vodacom-Original.svg')
// To echo the value use braces
{{ asset('you-are-in-public/your-file-name') }}
// Depending on what you want to achieve read below.
--
// This is how laravel asset reference works
asset() = "public/..."
// So the below example explains this
/* Implementation */ {{ asset('js/jquery.min.js') }}
/* Output */ "public/js/jquery.min.js"
--
// This is how you can adjust the default asset path in Laravel
// Step 1 : Inside your .env file add this
ASSET_URL="custom/path/to/my/stuff/"
// Step 2 : Now with the above implemented when you use asset()
/* Implementation */ {{ asset('js/jquery.min.js') }}
/* Output */ "custom/path/to/my/stuff/public/js/jquery.min.js"
// Run all Mix tasks...
npm run dev
// or, Run all Mix tasks and minify output...
npm run prod
// or, Watch assets for change
npm run watch-poll
asset()