Reputation: 2199
I wonder if there is a performance difference between using Facades and helper methods in laravel 5.1.
I startet to remove for example use View;
or View::make()
wherever possible, thinking that view()
would be simpler and possibly faster. But I don't know.
Same with Redirect::to()
--> redirect()
, Redirect::back()
--> back()
and so on..
Is there a difference or does it not matter?
Upvotes: 8
Views: 6247
Reputation: 1944
I don't think there is much performance difference but one thing to consider is the reduced cognitive load of always including the use
statement when using a facade. Just one more thing to forget.
Upvotes: 3