Answer the question
In order to leave comments, you need to log in
How to construct a query in laravel to select all news for a certain month?
It is necessary to extract from the database all published news of a certain category (for example, "second"). I do this with a simple query:
$data['news']=$news->where([
['category', '2'],
['published', '1']
])->get();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question