Support the ongoing development of →
posted 10 years ago
Last updated 1 year ago.

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.

Last updated 1 year ago.

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)

Hopefully some skilled guy or gal out there has a solution to this :D

Thanks anyway!

Last updated 1 year ago.

Sign in to participate in this thread!


Your banner here too?

rahaug rahaug Joined 18 Feb 2014


We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 - All rights reserved.