It took me few weeks to build Pixie, a lightweight, expressive, framework agnostic query builder for PHP, it can also be referred as a Database Abstraction Layer.
Now Laravel has this feature [built-in](http://laravel.com/docs/4.2/eloquent#query-scopes) What is Eloquent? Eloquent has been a really popular ORM in the PHP community lately, it was initially built for Laravel framework only.