reedware/laravel-composite-relations
Strengths:
BelongsTo, HasOne, HasMany) with Eloquent’s familiar syntax.user_id + role_id), or normalized schemas requiring composite keys.WHERE (col1 = ? AND col2 = ?)), avoiding N+1 or manual query tuning.reedware/laravel-relation-joins) and custom AND/OR glue logic for fine-grained control.whereHas) without learning new patterns.Weaknesses:
belongsToMany and polymorphic relations, which may force workarounds (e.g., intermediate tables) for many-to-many composite cases.id), not a composite key. This could require schema changes or manual overrides.OR conditions), complicating debugging or profiling.tenant_id + user_id).belongsToMany or polymorphic composite relations.WHERE clauses, but this is mitigated by the package’s optimized SQL generation.OR conditions). Mitigate by:
toSql() to inspect generated queries.reedware/laravel-relation-joins, ensure compatibility and test thoroughly.id), or do they also use composite keys? (This package assumes single-column PKs on the related model.)DB::enableQueryLog().)with() judiciously.)user_id + role_id).tenant_id + user_id relationships.parent_id + category_id for nested categories).user_id + permission_id + granted_at).belongsToMany or polymorphic composite relations.belongsTo with multi-column FKs).Order → Customer + Store).with()).whereHas).reedware/laravel-relation-joins).UPDATE table SET foreign_key1 = ..., foreign_key2 = ...).HasCompositeRelations trait.AND glue for exact matches).reedware/laravel-relation-joins for advanced query filtering.HasOne).whereHas with composite keys).How can I help you explore Laravel packages today?