Support the ongoing development of Laravel.io →
Database Eloquent Architecture
Last updated 2 years ago.
0

I solved this with

 Entry::skip($startOffset)->take($limit)->get()->filter(
   function($item) { 
    return $item->prize_id != null; 
 }
)->count();

what I needed to do was filter the collection returned from the limited set of results

it would be handy if whereNotNull etc existed on Collections!

0

Sign in to participate in this thread!

Eventy

Your banner here too?

jmp909 jmp909 Joined 29 Jan 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.