selectRaw( "COUNT(*) as amount, (SELECT COUNT(*) FROM products WHERE DATE(updated_at) = CURDATE()) as amountToday" ) ->get() ->transform( fn($sale) => [ "title" => $title, "amount" => $sale->amount, "amountToday" => $sale->amountToday, ] ) ->first(); } }