Category: Eloquent

Community Laravel PHP Eloquent Database

Laravel one-of-many relationships

This pull request to the Laravel framework provides a solution for creating one-to-one relations that are a partial relation of a one-to-many relation.

github.com

86 clicks
86 views

Community PHP Laravel Eloquent

Ordering database queries by relationship columns in Laravel

In this article we're going to explore how to order database queries by the value (column) of an Eloquent relationship.

reinink.ca

90 clicks
90 views

Community PHP Laravel Eloquent

Dynamic relationships in Laravel using subqueries

Use subqueries in Laravel to optimize your database selects.

reinink.ca

119 clicks
119 views

Community PHP Laravel Eloquent

Giving collections a voice

I gave a talk on this topic at LaraconAU, 2019. It covers all the ways custom collections can improve your systems design and contains some more guidance on when you would reach for this pattern.

timacdonald.me

77 clicks
77 views