You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Accept a plain model in Eloquent Collection identity methods on pivot-shaped collections #2363
Since #2360, BelongsToMany / MorphToMany relation properties are Collection<int, M&object{pivot: P}>. Eloquent Collection's identity methods then reject a plain model, although Laravel compares by key (is()):
The same already happens for ->get() results on Laravel 13.41+. Proposal: let the model-comparing params of contains(), doesntContain(), diff(), intersect() (and similar) in the Eloquent Collection stub accept TModel|\Illuminate\Database\Eloquent\Model. Related: #1860.
Activity