https://dev.to/raj_vue If you want to compare the timestamp column value with today's date then first you need to change the format of the date-time value to the current date *For example - * find today's date data from the database table compare on the field created_at which is the timestamp column type. $query->where(name, $name)->where(DB::raw("(DATE_FORMAT(date_time,'%Y-%m-%d'))"), Carbon::now()->format('Y-m-d')); Enter fullscreen mode Use DATE_FORMAT in DB::raw to convert the timestamp field into today's date and get data accordingly from the database.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners