fix login api

This commit is contained in:
andrey
2021-08-03 15:52:25 +03:00
parent f422a70fc3
commit c522278222
5 changed files with 13 additions and 6 deletions

View File

@ -38,7 +38,8 @@ class ReportSearchForm extends Model
public function byParams()
{
$queryBuilder = Reports::find()
->andWhere(['between', 'created_at', $this->fromDate, $this->toDate, $this->user_id])
->with('task')
->andWhere(['between', 'reports.created_at', $this->fromDate, $this->toDate, $this->user_id])
->limit($this->limit)
->offset($this->offset);
@ -47,7 +48,7 @@ class ReportSearchForm extends Model
$queryBuilder->andWhere(['user_card_id' => $userCardId]);
}
$data = $queryBuilder->all();
$data = $queryBuilder->asArray()->all();
return $data;
}