title: laravel bulk insertion array to string conversion
body: <p>I know there are other questions for bulk insertion in Laravel. But I am facing an issue when I try to store it in the database.  </p>
  
  <p>I am using <code>insert()</code> for bulk insertion. I have an array of data coming through <code>request</code>. I have never used <code>insert</code> method before. it is throwing an error:  </p>
  
  <blockquote>
    <p>Array to string conversion (SQL: insert into <code>questions</code> (<code>answer</code>, <code>question</code>, <code>questionnaire_id</code>) values (1995, What is model of your bike1, ?))</p>
  </blockquote>
  
  <p>I have developed a questionnaire. Questions are being added dynamically on button click using jQuery.</p>
  
  <p>Here is the method I am trying to store data:  </p>
  
  <pre><code>/**
   * Create questions
   *
   */
  public function createQuestions(Request $request)
  {
      // Insert new records
      $data[] = $request-&gt;except('_token');
      Question::insert($data);
      return back()-&gt;with('message', 'Questionnaire is being created successfully'); 
  }
  </code></pre>
  
  <p><strong>EDIT:</strong></p>
  
  <blockquote>
    <p>This is the html code which is being appended by jquery and user can add multiple question</p>
  </blockquote>
  
  <pre><code>'&lt;div class="question'"&gt;
      &lt;div class="form-group"&gt;'+
          &lt;label class="control-label col-md-4" for="question-type"&gt;Question Type:&lt;/label&gt;
              &lt;div class="col-md-4"&gt;'+
                  &lt;select class="form-control question-type" id="'+counter+'"&gt;
               &lt;option value="text" id='+counter+'&gt;Text&lt;/option&gt;
               &lt;option value="multiple" id="'+counter+'"&gt;Multiple Choice&lt;/option&gt;
            &lt;/select&gt;
         &lt;/div&gt;
     &lt;/div&gt;
  &lt;div class="form-group"&gt;
   &lt;label class="control-label col-md-4" for="question"&gt;Enter Question:&lt;/label&gt;
  &lt;div class="col-md-4"&gt;
   &lt;input type="text" name="question[]" class="form-control" /&gt;'+
     &lt;/div&gt;
   &lt;div class="col-md-4"&gt;
  &lt;button type="button" class="btn btn-danger btn-delete " id="'+counter+'"&gt;Delete Question&lt;/button&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  &lt;div class="form-group txt-answer'+counter+'"&gt;
  &lt;label class="control-label col-md-4" for="answer"&gt;Answer:&lt;/label&gt;
  &lt;div class="col-md-4"&gt;
                  '&lt;input type="text" name="answer[]" id="answer" class="form-control" /&gt;
              &lt;/div&gt;
          &lt;/div&gt;
        &lt;hr&gt;
     &lt;div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Here is <code>dd</code> result</p>
  
  <p><a href="https://i.stack.imgur.com/DOZFp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DOZFp.png" alt="enter image description here"></a></p>