title: Getting unknown property: app\models\AlumnyS2::alumniintegrasi
body: <p>I want to display data relation by making a relation between table alumniintegrasi with alumnys2, but when I made it with gridview, there was an error.</p>
  
  <p>it said '</p>
  
  <blockquote>
    <p>getting unknown property: app\models\AlumnyS2::alumniintegrasi.</p>
  </blockquote>
  
  <p>here is the code</p>
  
  <pre><code>&lt;?php
  
  use yii\helpers\Html;
  use yii\grid\GridView;
  use app\models\AlumniIntegrasi;
  
  /* @var $this yii\web\View */
  /* @var $searchModel app\models\AlumnyS2Search */
  /* @var $dataProvider yii\data\ActiveDataProvider */
  
  $this-&gt;title = Yii::t('app', 'Alumny S2s');
  $this-&gt;params['breadcrumbs'][] = $this-&gt;title;
  ?&gt;
  &lt;div class="alumny-s2-index"&gt;
  
      &lt;h1&gt;&lt;?= Html::encode($this-&gt;title) ?&gt;&lt;/h1&gt;
      &lt;?php // echo $this-&gt;render('_search', ['model' =&gt; $searchModel]); ?&gt;
  
      &lt;p&gt;
          &lt;?= Html::a(Yii::t('app', 'Create Alumny S2'), ['create'], ['class' =&gt; 'btn btn-success']) ?&gt;
      &lt;/p&gt;
      &lt;?= GridView::widget([
          'dataProvider' =&gt; $dataProvider,
          'filterModel' =&gt; $searchModel,
          'columns' =&gt; [
              ['class' =&gt; 'yii\grid\SerialColumn'],
  
              'NRP',
              //'NamaMahasiswa',
  
              [
              'attribute' =&gt; 'NamaMahasiswa',
              'value' =&gt; function($data) {
                  return $data-&gt;alumniintegrasi-&gt;NamaMahasiswa;
              },
  
              /*'filter' =&gt; Html::activeDropDownList($searchModel, 'orang_ID', ArrayHelper::map(Orang::find()-&gt;asArray()-&gt;all(), 'ID', 'Nama'),['class'=&gt;'form-control','prompt' =&gt; 'Select Category']),
              */
              ],
  
  
              'ProgramStudi',
              'Tanggal_Masuk',
              'Tanggal_Lulus',
  
              ['class' =&gt; 'yii\grid\ActionColumn'],
          ],
      ]); ?&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>and here is the model</p>
  
  <pre><code>&lt;?php
  
  namespace app\models;
  
  use Yii;
  
  /**
   * This is the model class for table "alumnys2".
   *
   * @property string $NRP
   * @property string $NamaMahasiswa
   * @property string $ProgramStudi
   * @property string $Tanggal_Masuk
   * @property string $Tanggal_Lulus
   *
   * @property AlumniIntegrasi $nRP
   */
  class AlumnyS2 extends \yii\db\ActiveRecord
  {
      /**
       * @inheritdoc
       */
      public static function tableName()
      {
          return 'alumnys2';
      }
  
      /**
       * @inheritdoc
       */
      public function rules()
      {
          return [
              [['NRP', 'NamaMahasiswa'], 'required'],
              [['NRP'], 'string', 'max' =&gt; 15],
              [['NamaMahasiswa'], 'string', 'max' =&gt; 50],
              [['ProgramStudi'], 'string', 'max' =&gt; 5],
              [['Tanggal_Masuk', 'Tanggal_Lulus'], 'string', 'max' =&gt; 30],
              [['NRP'], 'exist', 'skipOnError' =&gt; true, 'targetClass' =&gt; AlumniIntegrasi::className(), 'targetAttribute' =&gt; ['NRP' =&gt; 'NRP']],
          ];
      }
  
      /**
       * @inheritdoc
       */
      public function attributeLabels()
      {
          return [
              'NRP' =&gt; Yii::t('app', 'Nrp'),
              'NamaMahasiswa' =&gt; Yii::t('app', 'Nama Mahasiswa'),
              'ProgramStudi' =&gt; Yii::t('app', 'Program Studi'),
              'Tanggal_Masuk' =&gt; Yii::t('app', 'Tanggal  Masuk'),
              'Tanggal_Lulus' =&gt; Yii::t('app', 'Tanggal  Lulus'),
          ];
      }
  
      /**
       * @return \yii\db\ActiveQuery
       */
      public function getNRP()
      {
          return $this-&gt;hasOne(AlumniIntegrasi::className(), ['NRP' =&gt; 'NRP']);
      }
  }
  </code></pre>
  
  <p>I want to display NamaMahasiswa in table alumniintegrasi. how can I fix that?</p>