Support the ongoing development of Laravel.io →
posted 10 years ago
IOC
Last updated 2 years ago.
0

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.

Last updated 2 years ago.
0

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. ;)

Last updated 2 years ago.
0

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.

Last updated 2 years ago.
0

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.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Ulrira ulrira Joined 10 Feb 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.