I am not sure, if this has been tried before, but I would do this with the 'whereRaw' method containing a subquery. http://dev.mysql.com/doc/refman/5.0/en/subqueries.html http://laravel.com/docs/4.2/eloquent
But I am also a Laravel newbie. It might also be (much more easily) possible with a series of the right query builder functions, i.e. something like this
$rows = MyModel::where('xxx', '>', 100)->count()->take(5)->where('yyy', '=', 'John Doe')->get();
The idea being that the first query builders count something and take only 5 results, and then you query it further...
Hope that helps and sorry for not being more specific.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community