A
A
alexeygavrilovs2020-03-05 11:36:00
Laravel
alexeygavrilovs, 2020-03-05 11:36:00

How to use Carbon to display all posts that were published before a certain date?

Good afternoon, how to use the Carbon method to display all posts that were published 1 day ago and later?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
J
JhaoDa, 2020-03-05
@alexeygavrilovs

No way.

J
jazzus, 2020-03-05
@jazzus

$builder->whereDate('created_at','<', now()->sub(1,'day'))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question