I have a model Laravel, Users. It uses the standard Laravel timestamp: created_atand updated_at.
I want to find users created on the same day as this user.
The problem is that I can not directly compare database fields, because these fields also contain the time, for example 2016-03-27 14:46:30.
I want to do something like this:
User::where('created_at', $user->created_at);
But it seems that this is not so.
Any suggestions?
source
share