title: How to get attribute label in Yii2 ActiveRecord
body: <p>How to get attribute label in Yii2?</p>
  
  <p>I found this function <code>getAttributeLabel()</code> <a href="http://www.yiiframework.com/doc-2.0/yii-base-model.html#getAttributeLabel%28%29-detail" rel="noreferrer">here</a> in Yii2 doc, I am using it in a controller. But it's throwing an error:</p>
  
  <p><code>Call to undefined function app\controllers\getAttributeLabel()</code></p>