title: Binding parameters in laravel insert query
body: <p>Using Laravel's query builder, I formed a database transaction with the following queries:</p>
  
  <pre><code>DB::transaction(function($map) {
  
      DB::connection('network')-&gt;table('Maps')
                                -&gt;insert([
                                      'Name' =&gt; '?',
                                      'Gametype' =&gt; '?',
                                      'Author' =&gt; '?',
                                      'Enabled' =&gt; '?',
                                      'Public' =&gt; '?',
                                      'Required' =&gt; '?',
                                      'Image' =&gt; '?',
                                      'ReleaseDate' =&gt; '?',
                                      'ContactInfo' =&gt; '?',
                                  ], [
                                      $map['name'], 
                                      $map['game'], 
                                      $map['creator'], 
                                      $map['enabled'], 
                                      $map['public'], 
                                      $map['required'], 
                                      $map['image-url'], 
                                      $map['released'], 
                                      $map['contact'],
                                  ]); 
  
      DB::connection('website')-&gt;table('panel_logs')
                               -&gt;insert([
  
                                      'message' =&gt; 'Added a new map to '. $map['game'] .' called '. $map['name'] .'.',
                                      'timestamp' =&gt; Carbon::now(),
                                      'tag' =&gt; 2,
                                      'username' =&gt; Auth::user()-&gt;username
  
                                  ]);
  
  });
  </code></pre>
  
  <p>The first query inserts data into a database using query bindings. I have an array called <code>maps</code> containing the data for the insert and I would like to bind on the values however it's not working because it's treating the second array as another insert. In the docs, they didn't provide an example of query binding using the builder. Would it be better just to insert the data without binding? Will this still protect me from SQL injection as I think Laravel uses prepared statements anyway with their builder. I just would like to make sure things don't go horribly wrong.</p>