I want to change row color as per MySQL query where expiry date is greater than current date and less than within month.
'rowOptions'=>function($model) {
if($model['expirydate'] >= '2018-08-10') {
return ['class' => 'danger'];
}
},
How can I use below condition in rowOption to highlight upcoming expiry domain row--
$domains=Domains::find()
->Where('expirydate BETWEEN NOW() AND DATE_ADD(NOW(), INTERVAL 1 MONTH)')
->andWhere(['or',['status'=> 'Active'],['status'=> 'Pending Transfer']])
->orderBy(['expirydate' => SORT_ASC])
->all();