Support the ongoing development of Laravel.io →
Database Eloquent

Hello,

I have those tables :

question : id - integer name - string

user : id - integer name - string

question_view : id - integer question_id - integer user_id - integer date - datetime

I would like to know what's the best way to get the number of row for a given question_id in question_view.

Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

LR3my lr3my Joined 30 Nov 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.

© 2025 Laravel.io - All rights reserved.