->andWhere( 'UNIX_TIMESTAMP (event.date_to) >= '.strtotime('2018-11-25' . '00:00:00'))
->andWhere( 'UNIX_TIMESTAMP (event.date_to) <= '.strtotime('2018-11-25' . '23:59:59'))
$query->groupBy('id');
$this->getTabs()
/**
* @param $query ProfileQuery
* @return mixed
*/
public function getTabs($query): ProfileQuery
{
$tab = Yii::$app->request->get('tab');
if ($tab == Profile::TAB_ONLINE) {
return $query->online();
} else if ($tab == Profile::TAB_ALL) {
return $query;
} else {
\Yii::$app->request->setQueryParams(['tab' => Profile::TAB_ALL]);
return $query;
}
}