The parent's constructor is not automatically fired when extending it. So the repo is not setup when you do
new Provider1DeliveryReport();
You can solve it by adding parent::__construct()
to you Provider1DeliveryReport::__construct()
but that's the same amount of work as injecting the repo.
Maybe somebody else has a great idea.
Thanks for your reply zenry.
Actually, the only way I get this working is to do like this on all provider classes:
public function __construct(DeliveryReportRepositoryInterface $repo)
{
parent::__construct($repo);
}
Hopefully some skilled guy or gal out there has a solution to this :D
Thanks anyway!
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community