I am new to Laravel.
I am building app that counts your daily steps.
And I am building API, so I need to return 0 steps when there are no results in DB for selected days in array.
But if there is data for some of the days to return actual steps and to return 0 for other days.
I have tried this:
$steps = Step::whereIn('date', $dates)
->where('user_id', Auth::id())
->get();
But it returns only matches. As I wrote I want to return data for all days, not only for days in DB. Please, help :)