title: Yii2 - Model is not saving in foreach loop in Yii2
body: <p>I have a variable</p>
  
  <p>I have run foreach loop for every item</p>
  
  <pre><code>$tags = ['#first_Tag','#second_tag','#third_tag','#fourth_Tag'];
  foreach ($tags as $t) :
  
    $model = new Tags;
  
    $model-&gt;tag_name = $t;
  
    $model-&gt;save(); //yii2
  
  endforeach;
  </code></pre>
  
  <p>this function only saves the last item which is #fourth_Tag.
  Can any one have solution about this. Thanks in advance.</p>