Level 102
You mean the count of dismissed and clicked? https://laravel.com/docs/9.x/eloquent#retrieving-aggregates
Or use raw selects to select both :)
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi, I would like to calculate two variables in this query, namely dismissed and clicked if they are true, how can I do that? May?
$query = Popup::query()
->where('client_id', $clientId)
->whereBetween('created_at', [$startDate->format('Y-m-d')." 00:00:00", $endDate->format('Y-m-d')." 23:59:59"]);
Please or to participate in this conversation.