Eloquent, Laravel's ORM, is a powerful tool for interacting with relational databases. It models entity relationships such as one-to-many and many-to-many, but production applications often need to produce very specific data structures that cannot be directly generated from Eloquent built-in methods. Instead of looping through collections to wrangle your query results, it is possible to extend Laravel's basic relation classes and implement custom relations that you can easily reuse within and among Laravel projects. You will dive into the guts of Eloquent and emerge an effective power user.


Comments are closed.