Level 75
Apr 6, 2017
2
Level 2
Selecting date field
I am having problems selecting a date field. Lets say created_at has the value of
"created_at": "2017-04-01 14:27:36" I want to write a Eloquent statement like this
$getCurrent=$Usage->where([
['track_id', '=', 16],
['user_id', '=', 1],
['created_at', '=', date('Y-m-d')]
])->get();
So in the created_at it will select the current date minus the time.
Please or to participate in this conversation.