I have a data table named CallTriggers
with the attributs
cloturer = 0 or 1
created_at
and I want to get all the data like this
$array = [
['Month', 'Total Call', 'Close'],
['Jan', 57, 50],
['Feb', 67, 60],
['Mar', 40, 40],
['Apr', 33, 30],
['May', 70, 66]
];
Example:
['Jan', 57, 50] here jan is the month, 57 is number of call in the month with value 1 and 50 is number of that the value is 0 in database.
How can I perform that kind of operation with Laravel 5.6
? Thanks