eager-load-pivot-relations icon indicating copy to clipboard operation
eager-load-pivot-relations copied to clipboard

Ability to use `loadCount`

Open danilopolani opened this issue 4 years ago • 3 comments

Hello, the package works great! It would be nice to have the chance to use loadCount too, like we already use with / load.

Currently if I try to use it to load count a pivot relationship, it just throws an error like this:

Call to undefined method App\Citizen::vehicles.registration()

Where registration is the custom name of the pivot table.

danilopolani avatar Sep 13 '20 13:09 danilopolani

@danilopolani can you show how you did it in your code?

ajcastro avatar Oct 01 '20 04:10 ajcastro

Did you figure this out and could possible share code? Thank you

lahivee avatar Jun 15 '21 09:06 lahivee

Ehy, sorry, this refers to an old project to which I no longer have access. If I'm right, I didn't find a valid solution tho :/

danilopolani avatar Jun 15 '21 09:06 danilopolani