Using dependency injection over laravel facades
This is one of the benefits of constructor injection – it becomes obvious when you class is doing to much, because the constructor parameters grow too large. 1st thing to do is split up controllers that have too many responsibilities. Say you have a page controller: Class PageController { public function __construct( Request $request, ClientRepositoryInterface … Read more