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

Not directly related to your question, but...just a thought -flies away-

Depending on your use case, counting might cost a lot. If you run a count query when a user logs off, the user has to wait until your server returns the data. Do users have to wait for something they're not going to use after they sign out? I think this is something that we might want to consider.

I think it's better to put those count queries into a queue to process them in the background. If eloquent can't help, then just run the raw query.

Last updated 1 year ago.
0

Ofcourse I'm processing this in the background to not let the user wait. Though I'm just wondering what the best way would be to use this in Laravel (and Eloquent as far as possible).

Last updated 1 year ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

baasjef baasjef Joined 11 Feb 2014

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.