We have been working a lot more with Laravel lately and one of the most enjoyable aspects of that has been using the Eloquent ORM. Being able to effortlessly fetch data from the database makes me realize how relatively painstaking it is to handle similar work in WordPress. Basic post fetching is simple enough in WordPress, even meta data loading, but when it comes to joins and custom tables we’re basically on our own created raw SQL.
Eloquent ORM makes fetching data easy, but it’s also got a nice way of handling all other CRUD functions. It has functions like createOrUpdate() that handle real-world situations very well.
Here is a package on OpenSourceLibs that let’s us integrate the Eloquent ORM with WordPress: Wp Eloquent – Eloquent ORM for WordPress – (wp-eloquent) (opensourcelibs.com)