I'm trying to build up a query method in Laravel (5.8) to retrieve the entries made in current date (think at "Discover this day" from Facebook, it's kinda the same).
I have the following code:
$todayMementos = Memento::where(['user_id' => auth()->user()->id])
->whereDate('date', Carbon::isSameDay())
->get();
I tried to compare the date with this function; I'm using Carbon "isSameDay()" for it, not sure if it's the right function to choose but the result I want is this:
If in this DD-MM-no-matter-the-year, user has added some entries, give them to me.
Suggestions? Thank you in advance!