3 months ago

How to count from an column?

Posted 3 months ago by andreixfr

Hello guys!Finally, I found how to count number of rows in a table with this code

$countEvents = Event::count();
            return view('event.view_all_events',$data)

My question is, how can I count from table Event -> column 'category_id' with id 9 or 18?

Please sign in or create an account to participate in this conversation.