title: yii to update record with loadModel
body: <p>I am trying to update the whole form so trying to use massive assignment using attributes in yii. But getting error as </p>
  
  <blockquote>
    <p>AcademicsController and its behaviors do not have a method or closure
    named "loadModel".</p>
  </blockquote>
  
  <p>Here is my code used</p>
  
  <p>Here $_GET['id'] = 5 and $_POST['courses'] is array</p>
  
  <pre><code>if(isset($_GET['id']) &amp;&amp; isset($_POST['courses'])) {
      $course_id = $_GET['id'];
      $post = $_POST['courses'];
      $model = $this-&gt;loadModel($course_id);
          $model-&gt;save();
  }
  </code></pre>
  
  <p>How to update all form fields?</p>