Level 102
Something like
->whereDate('created_at', '<', now()->subMonths(3))
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
in my laravel app I want to get all records of users where "created_at" timestamp is older than three months from current date, is it possible to achieve this with Eloquent query builder?
Something like
->whereDate('created_at', '<', now()->subMonths(3))
Please or to participate in this conversation.