Order::whereRaw('date(created_at) = ?', [$date])->get();
Jul 2, 2015
6
Level 2
Using mysql DATE function inside query
Hi.
I have this query :
$pagination =Orders::where('created_at' ,'=' ,'2015-07-24 07:22:00')->paginate(11);
and it work fine, now I need a specific option,to check only date from timestamp.
Sql query will be :
SELECT * FROM orders WHERE date( created_at ) = '2015-07-24'
NOw, how to implement date( created_at ) in Laravel query ?
Tnx
Please or to participate in this conversation.