-
Get the newest (or oldest) item of another relation
-
Add where statement to Many-to-Many relation
-
OrderBy on Eloquent relationships
-
Conditional relationships
-
Raw DB Queries: havingRaw()
-
Eloquent has() deeper
-
Has Many. How many exactly?
-
Default model
-
Use hasMany to create Many
-
Multi level Eager Loading
-
Eager Loading with Exact Columns
-
Touch parent updated_at easily
-
Always Check if Relationship Exists
-
Use withCount() to Calculate Child Relationships Records
-
Extra Filter Query on Relationships
-
Load Relationships Always, but Dynamically
-
Instead of belongsTo, use hasMany
-
Rename Pivot Table
-
Update Parent in One Line
-
Laravel 7+ Foreign Keys
-
Combine "whereHas" with "orDoesntHave"
-
Check if Relationship Method Exists
-
Pivot Table with Extra Relations
-
Load Count on-the-fly
-
Randomize Relationship Order
-
Filter hasMany relationships
-
Filter by many-to-many relationship pivot column
-
A shorter way to write whereHas
-
You can add conditions to your relationships
-
New `whereBelongsTo()` Eloquent query builder method
-
The `is()` method of one-to-one relationships for comparing models
-
`whereHas()` multiple connections
-
Update an existing pivot record
-
Relation that will get the newest (or oldest) item
-
Replace your custom queries with ofMany
-
Avoid data leakage when using orWhere on a relationship