Using dependency injection over laravel facades
问题 I have read a number of sources that hint that laravel facade's ultimately exist for convenience and that these classes should instead be injected to allow loose coupling. Even Taylor Otwell has a post explaining how to do this. It seems I am not the only one to wonder this. use Redirect; class Example class { public function example() { return Redirect::route("route.name"); } } would become use Illuminate\Routing\Redirector as Redirect; class Example class { protected $redirect; public