Insert multiple rows data into db

Posted in CategoryLaravel
  • S
    Shruti 2 months ago
    <td>                                        
    <select class="form-control show-tick" id="Location Address" name="0[location_address]" title="select location" required autocomplete="off">
    <option value="">Select Location Address</option>
    </select>                                     
    </td>
    
     <td>
      <div class="dropdown">
      <select class="form-control show-tick" name="0[streams]" id = "streams" data-toggle="dropdown">Select <span class="caret" id="streams"></span></select>
    </div>
    </td>
    
    <td>
     <div class="dropdown">
       <select class="form-control show-tick" name="0[sub_stream]" id="sub_stream"  data-toggle="dropdown">Select<span class="caret" id="sub_stream"></span>
    </select>
    </div>
    </td>
    <td>
    <div class="dropdown">
      <select class="form-control show-tick" multiple id="medium" name="0[medium]"  data-toggle="dropdown">Select<span class="caret" id="medium"></span>
    </select>
       </div>
    </td>

    I have written controller where I am trying to insert data. Whenever I am inserting more rows of data it is taking only last row data and inserting into db.

     

  • S
    Shruti 2 months ago

    Please help me knowing where i am going wrong. I am new to laravel

     

  • H
    HadeesKyu 2 months ago

    what mean 0[] ??

Please login or register to leave a response.

* You May Also Like Bellow Issue to check *