Route is a facade of $app['router'] if I'm not mistaken.
When you call the facade you are accesing to the root class, and I think that you could use the facade for write less code, but If you are more comfortable writing the root class, you can do it.
Hope it helps you.
The speed difference is so tiny that worrying about it before you're getting a hundred thousand hits a day is pointless. Use whatever is more readable, and spend the time you save reading your code to figure out the few thousand better ways to improve your app's speed. ;)
codeATbusiness said:
Route is a facade of $app['router'] if I'm not mistaken.
When you call the facade you are accesing to the root class, and I think that you could use the facade for write less code, but If you are more comfortable writing the root class, you can do it.
Hope it helps you.
So I guess $app['router'] is a little bit faster than the other because it does not need to resolve the Facade.
Ulrira said:
codeATbusiness said:
Route is a facade of $app['router'] if I'm not mistaken.
When you call the facade you are accesing to the root class, and I think that you could use the facade for write less code, but If you are more comfortable writing the root class, you can do it.
Hope it helps you.
So I guess $app['router'] is a little bit faster than the other because it does not need to resolve the Facade.
Yes but I don't think your application will not be affected for it.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community