Support the ongoing development of →
Laravel Database
Last updated 8 months ago.

If you track the number of views and downloads by simply having a 'counter' in the database it's impossible to say which picture is the most popular this week/month.

I would recommend you to order the pictures by popularity. Pictures::where('status', 'active')->orderByDesc('views', 'downloads')->take(2)->get()


Sign in to participate in this thread!

Full Stack Europe

Your banner here too?

Morish webfuelcode Joined 20 May 2020


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

Your logo here?

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

© 2023 - All rights reserved.