In Laravel, Facades are like shortcuts to access Laravel’s classes and features without writing long code or creating objects manually.
They give you a simple static interface for complex class methods that are stored in Laravel’s service container.
Think of a facade like a remote control — you press a button (call a method) and something happens in the background without you worrying about the wiring inside.
Example:
Instead of writing:
$app = new \Illuminate\Filesystem\Filesystem();
$app->delete('file.txt');
You can simply write:
File::delete('file.txt');Here, File is a facade that directly gives you access to the filesystem service.
Facades are great for quick access to Laravel services, but for testing and dependency injection, you may prefer using service container bindings directly.