Answer the question
In order to leave comments, you need to log in
How to select by dates?
Hello, I can’t master the selection by date, in general I don’t understand how it should work.
Given a YII2 based API, controllers and models, the URL is set up like this.
https://api.site.ru/v1/:users
In general, I just started working with data, getting, writing and editing everything works, but I can’t understand how to get data by start date and of course date, through the URL, if not difficult simple examples can anyone show.
In examples from the network, such options slip through,
public function search($params)
{
$query->andFilterWhere(['like', 'timestamp', $this->dateBegin]);
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