Open RedFernLiam opened 4 years ago
We have ->with(), we have ->withCount() we have ->morphWith() but, we are missing ->morphWithCount().
->with()
->withCount()
->morphWith()
->morphWithCount()
Implemented something like this:
$morphTo->morphWithCount([ Screencast::class => 'videos', ]);
I think this would be a great addition as I ran into a situation where I needed it.
I have the same problem, looks like there is no solution to it right now.
@ggolda I have currently used $withCount property on the model to temporarily get around this. Be careful because it's used everywhere.
We have
->with()
, we have->withCount()
we have->morphWith()
but, we are missing->morphWithCount()
.Implemented something like this:
I think this would be a great addition as I ran into a situation where I needed it.