march 18, 2020
laravel
, eloquent
, scopes
, modular
, relationships
Laravel Eloquent models are not `Macroable` by default, if you want to add a relationship dynamically on a model in another module or package, you need to macro through the `Builder` instead of the `Model`.
read more
october 26, 2018
eloquent
, collection
Many Laravel newbies don't know that you can customize the collection returned by a query, so they end up writing tons of after-query functions to wrangle their results. I know a better way.
read more