Laravel Eloquent date(now) compare two date not working

Viewed 4318

I have this on Simple query

SELECT * FROM `blogs` WHERE DATE(NOW()) = DATE(updated_at)

and it shows result,

but when I try

$blog = Blog::whereDate('updated_at', '=', 'DATE(NOW())')->get();

$blog = Blog::where('DATE(NOW())','=', 'DATE(updated_at)')->get();

$blog = Blog::where(DB::RAW('DATE(NOW()) = DATE(updated_at)'))->get();

tried these three... still can't

1 Answers
Related