title: Yii2 : Active Record Column Aliases
body: <p>I'm using Yii2 framework with advanced template.</p>
  
  <p>I get problem with column alias in my controller file, here's my code:</p>
  
  <pre><code>$models = new ActiveDataProvider([
      'query' =&gt; User::find()-&gt;select(['member'=&gt;'fullname'])
  ]);
  </code></pre>
  
  <p>The above query equivalent with:</p>
  
  <pre><code>SELECT fullname AS member FROM User;
  </code></pre>
  
  <p>I send the data to the view using this code:</p>
  
  <pre><code>return $this-&gt;render('view', [
          'model' =&gt; $models,
      ]);
  </code></pre>
  
  <p>I want to call the data in my view using GridView widget, here's my code:</p>
  
  <pre><code>echo GridView::widget([
      'dataProvider' =&gt; $model,
      'columns' =&gt; [
          'member',
      ],
  ]);
  </code></pre>
  
  <p>However, I got an error that tell me the 'member' parameter is not defined.
  How can I show the data of my query by calling the column name? (in my case it using alias)</p>
  
  <p>I really appreciate any kind of helps!!</p>