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

I think I've seen this error about a year ago, seems you have endless recursion in your PHP. If A requires B and B requires, you have an infinite loop. Or if A is a dependency of B, and B is a dependency of C, and C is a dependency of A, same thing.

Binding to the container is easy:

App::bind('Interface', 'ConcreteClass');
Last updated 2 years ago.

@maurocasas Just for sure you're doing it right. Does your script violate the SOLID principles? I mean, it should not have something like A depends B and B depends A at the same time. You can solve this problem by re-design your application's structure like: Make a service layer like PaymentService built on top of Wallet repo and Transaction repo, any functions that the Wallet needs from Transaction and vice-versa will be moved to the service.

Last updated 2 years ago.

Sign in to participate in this thread!


Your banner here too?

maurocasas maurocasas Joined 25 May 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.