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

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners