title: create crud doesnt work in yii2
body: <p>i make a simple CRUD in yii2 backend from table name "Guru",i already make models with the same table and make the CRUD but when i try to Create new data from the Create function,the data doesnt saved in database at all,i already make the code similar with the frontend and change the namespace but it didnt work at all in backend.</p>
  
  <p>here is my backend "Guru" models code </p>
  
  <pre><code>&lt;?php 
   namespace backend\models;
   use Yii;
   class Guru extends \yii\db\ActiveRecord
  {
  /**
   * @inheritdoc
   */
  public static function tableName()
  {
      return 'guru';
  }
  
  /**
   * @inheritdoc
   */
  public function rules()
  {
      return [
          [['nip', 'nama_guru', 'ttl', 'jenis_kelamin', 'alamat', 'telp', 'agama', 'jabatan', 'user', 'pass', 'role', 'tgl_create', 'update_create', 'mapel'], 'required'],
          [['jenis_kelamin'], 'string'],
          [['mapel'], 'integer'],
          [['nip', 'telp', 'jabatan', 'user', 'pass'], 'string', 'max' =&gt; 20],
          [['nama_guru', 'ttl'], 'string', 'max' =&gt; 30],
          [['alamat'], 'string', 'max' =&gt; 50],
          [['agama', 'role', 'tgl_create', 'update_create'], 'string', 'max' =&gt; 10]
      ];
  }
  
  /**
   * @inheritdoc
   */
  public function attributeLabels()
  {
      return [
          //'id_guru' =&gt; 'Id Guru',
          'nip' =&gt; 'NIP',
          'nama_guru' =&gt; 'Nama Guru',
          'ttl' =&gt; 'Tempat Tanggal Lahir',
          'jenis_kelamin' =&gt; 'Jenis Kelamin',
          'alamat' =&gt; 'Alamat',
          'telp' =&gt; 'No Telpon',
          'agama' =&gt; 'Agama',
          'jabatan' =&gt; 'Jabatan',
          'user' =&gt; 'User',
          'pass' =&gt; 'Pass',
          'role' =&gt; 'Role',
          'tgl_create' =&gt; 'Tgl Create',
          'update_create' =&gt; 'Update Create',
          'mapel' =&gt; 'Mata Pelajaran',
      ];
  }
        /**
   * @return  \yii\db\ActiveQuery
   */
  public function getJadwalGuru() {
      return $this-&gt;hasMany(Jadwal::className(), ['id_mapel'=&gt;'mapel']);
  }
    public function getJadwal() {
      return $this-&gt;hasMany(Jadwal::className(), ['nip'=&gt;'id_guru']);
  }
  </code></pre>
  
  <p>}</p>
  
  <p>and this is my Controller code</p>
  
  <pre><code>namespace backend\controllers;
  
  use Yii;
  use backend\models\Guru; 
  use backend\models\GuruSearch;
  use yii\web\Controller;
  use yii\web\NotFoundHttpException;
  use yii\filters\VerbFilter;  
  public function actionCreate()
  {
      $model = new Guru();
  
      if ($model-&gt;load(Yii::$app-&gt;request-&gt;post()) &amp;&amp; $model-&gt;save()) {
          return $this-&gt;redirect(['view', 'id' =&gt; $model-&gt;id_guru]);
      } else {
          return $this-&gt;render('create', [
              'model' =&gt; $model,
          ]);
      }
  }
  </code></pre>
  
  <p>i really dont know why it doesnt work when the other CRUD in backend and frontend is work.i'm new to this framework,please kindly help me.</p>