Eloquent ORM is probably one of features that draws the most users to Laravel. However, I find that after a bit of working with Laravel, many users don't quite get what is happening under the hood. Some users call some of this "magic" and it can seem this way.

It turns out, that once you get around a few of the magical areas of Eloquent, it is relatively straightforward. The problems come when new users try to dig in past surface depth and go do something more than simple Get & Set.

To alleviate these issues, the next few weeks, I will be covering Eloquent a bit more in-depth and try to explain some of the magic that is going on under the hood. Some of the topics will include:

  1. Starting Up Eloquent - How things are booted up in Eloquent
  2. Connections - The life-blood of everything database
  3. To Persist or Not To Persist - Instances vs creation and such
  4. Static Calls?
  5. Building Queries
  6. Getting Attributes
  7. Setting Attributes
  8. Dates
  9. Dirtiness
  10. Hacking Magic Methods

If you have requests for other topics, feel free to ask them! And never be afraid to extend Eloquent into your own abstract class.