beginnerLaravel
Previous
What is the difference between the register() and boot() methods?
Next
How are facades different from dependency injection?
What are facades in Laravel?
Answer
Clear, interview-ready explanation
Laravel facades provide a concise static-looking interface to services that are actually resolved from the service container. Examples include Cache, DB, Log, Mail, Route, and Storage, all commonly imported from the Illuminate\Support\Facades namespace.
A facade is not simply a traditional static utility class: it acts as a proxy to a container binding. This gives expressive syntax while retaining Laravel’s ability to replace or fake services in tests. Facades are convenient for focused use, but excessive use can hide a class’s dependencies.