Let's picture this scenario:
You have to build a new project for a client. You found that awesome template that fits exactly with it, and you start refactoring the index into separate views.
But, most likely, your template is using relative paths to local stylesheets, icons, images and scripts.
If you are using Laravel, your routing will break your assets relative paths, hence why you should use
asset() helper function to wrap them.
Thats what Larassets does, it wraps your local assets with the
Of course, we don't want our CDN files being converted to local paths, so we will ignore those.
And, if you are using cache busting with
elixir() helper function, you can add which files
to be wrapped around it instead of using
asset(). Just the file name will do.
Also, if you want, you can use
secure_asset() instead of asset. It will force HTTPS on your
If you have any feedback, comment or just wanna send some kudos or ideas for a useful Laravel tool, send us a mail at [email protected]