Laravel – Eloquent model relationship with where clause good idea
A project I've taken over creates relationships in a rather odd way that I've never seen done before. consider one such example: public function invites(): BelongsToMany { return $this->belongsToMany( Invite::class, 'user_invites', 'id', 'user_id' )->where('is_active', 1); } I have concerns for…