2
Fala Marlon,
I believe you need something like this:
SELECT
t.restaurante,
SUM(t.quantidade) AS quantidade,
t.dataReserva
FROM
teste t
WHERE
t.dataReserva >= NOW()
GROUP BY t.dataReserva, t.restaurante;
Laravel
$reservas = teste::select("restaurante", DB::raw("SUM(t.quantidade) AS quantidade"), "dataReserva")
->where("dataReserva", ">=", date("Y-m-d"))
->groupBy("dataReserva", "restaurante");
Thanks a lot Thiago. It worked perfectly!
– Marlon Assunção