1 week ago

What are the advantages by using facades?

Posted 1 week ago by Bassone

Hello! I'm new to laravel, and there are things I don't understand well. I know what are facades and how they works, but I can't understand why I should define a facade rather than define a class with static methods. What are the motivations behind this choice? Also, in the laravel documentation I often see "Facades vs Contracts", as one thing exclude the other, but in the same documentation we also see that we could have a corresponding facade for some contract. Plus, I could define a facade that implements a contract (interface). Then, sometimes why should I see them as two opposite things? Thanks!

Please sign in or create an account to participate in this conversation.