Answer the question
In order to leave comments, you need to log in
How to select by date?
Good afternoon. I want to make a scope in the model to select records in a certain period of time (from and to)
There is an updated_at field in the database in the carbon::now() format.
What is the best way to do this?
db postgres
Answer the question
In order to leave comments, you need to log in
You don't need a scope, Laravel already has a method for thisModel::whereBetween('column', [$from, $to]);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question