How to eager load relationship inside infolist repeatable entry
I've enable prevent lazy loading like this in providers
I create a relationship manager and I display the data in infolist. but when it comes to repeatable entry like below example, I always got this error
I can put
Model::preventLazyLoading(! $this->app->isProduction());I create a relationship manager and I display the data in infolist. but when it comes to repeatable entry like below example, I always got this error
Attempted to lazy load [customer] on model [App\Models\Reply] but lazy loading is disabled.I can put
protected $with = ['customer']; inside Model, but it's not a great solution IMO, so what should be the best way to eager load the relationshipSolution
Yes, so helpful.. Now I use
->modifyQueryUsing() and load relationship. it's working now, thanks