Laravel 4 difference between URL::asset() and asset()

Viewed 17444

For loading assets in Laravel 4 projects there is a helper to create a URL for an asset

<link rel="stylesheet" href="{{ asset('css/styles.css') }}" />

But that helper could be called using a facade too

<link rel="stylesheet" href="{{ URL::asset('css/styles.css') }}" />

which produce the same result.

So my question is, which is the real difference here, one way is better in terms of performance than the other or is just a preference style ??

2 Answers
Related