$query = ReportMailing::find()->joinWith(['mailing']);
$query->andFilterWhere(['{{%report_mailing}}.user_id' => Yii::$app->user->id]);
$query->andFilterWhere(['like', '{{%mailing}}.subject', $this->subject])
->andFilterWhere(['like', '{{%report_mailing}}.status', $this->status]);
$query->andFilterWhere(['>=', '{{%report_mailing}}.created', $this->dateFrom])
->andFilterWhere(['<=', '{{%report_mailing}}.created', $this->dateBy.'23:59:59']);
$query = ReportMailing::find()->joinWith(['mailing']);
$query->andFilterWhere(['like', '{{%mailing}}.subject', $this->subject]);
$query->andFilterWhere(['>=', 'created', $this->dateFrom])
->andFilterWhere(['<=', 'created', $this->dateBy.'23:59:59']);
[
'attribute' => 'mailing_id',
'format' => 'raw',
'value' => function ($data) {
return Html::a($data->mailing->subject, Url::to(['report/view', 'id' => $data->id]));
},
],