I\'m using Laravel Framework.
I want all of the rows for this day. This is what I tried:
DB::table(\'users\')->where(\'created_at\', \'>=\', date(
Hmmm...there was a good answer to this question which seems to have now disappeared.*
It was something like this:
User::where('created_at', '>=', new DateTime('today'))
Note: if you're putting this code in a file with a namespace, or might use a namespace in the future, you should prefix the DateTime class with a backslash: new \DateTime('today')
.
* https://stackoverflow.com/questions/15052679/laravel-framework-how-to-get-today-queries