Related questions
Yii2 data provider default sorting
In Yii 1.1 this code works for default sorting:
$dataProvider = new CActiveDataProvider('article',array(
'sort'=>array(
'defaultOrder'=>'id DESC',
),
));
How default sorting can be set in Yii2?
Tried below code, but no result:
$dataProvider = new ActiveDataProvider([
'query' => $query,
…
Yii2 How to perform where AND or OR condition grouping?
I am new to Yii-2 framework. How can i achieve following query in Yii-2 framework using activeQuery and models.
SELECT * FROM users AS u WHERE u.user_id IN(1,5,8) AND (u.status = 1 OR u.verified = 1) OR (u.social_account = 1 AND …
Getting base URL in Yii 2
I am trying to get the base URL for the project in Yii 2 but it doesn't seem to work. According to this page you used to be able to do:
Yii::app()->getBaseUrl(true);
In Yii 1, but it …