select * from `prices` where `prices`.`item_id` in ('1', '2', '3') and `created_at` <= '2014-06-20 22:26:58' order by `created_at` desc limit 3
i will receive this query with
function ($query) {
$query->where('created_at', '<=', Carbon::now())->latest()->take($limit);
}
i want $limit variable equals to count ('1', '2', '3'), for now its 3 but how i can use $query to count this?
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community