title: Eloquent multiple rows insert and in one array loop
body: <p>I have user input following the rules below;</p>
  
  <pre><code>public function rules()
      {
          return [
              'phone_number' =&gt; 'required|array',
              'amount' =&gt; 'required|string|max:4',
              'phone_number_debit' =&gt; 'required|string|max:15',
          ];
      }
  </code></pre>
  
  <p>I would want to save the data in a model <code>Transaction</code>. For the phone_number it is an array that could have one value or multiple. So that leaves for foreach loop. </p>
  
  <p>This is what I want to achieve, save different rows determined by the number of records in the array. </p>
  
  <pre><code>$transaction = new Trasaction();
  $transaction-&gt;phone_number = $req-&gt;phone_number; //Value in the array
  $transaction-&gt;amount = $req-&gt;amount;
  $transaction-&gt;phone_number_debit = $req-&gt;phone_number_debit;
  $transaction-&gt;save();
  </code></pre>
  
  <p>Save diffrent records according to the records in the phone_number array.</p>
  
  <p>However I can not think of a way to achieve this. </p>
  
  <p>Anyone?</p>