title: How to delete records based on the multiple where conditions as an array in laravel
body: <p>I am searching in docs and in the stack exchange for days that, is there any way that I can actually pass an array with multiple conditions in it to delete the record in the Laravel 4.2?</p>
  
  <p>
  <b>Example</b>
  </p>
  
  <p>
  I want to achieve something like below
  </p>
  
  <pre><code>DELETE FROM `employees` WHERE user_id = 5 AND dept_id = 5
  </code></pre>
  
  <p>
  For this can I do something like below?
  </p>
  
  <pre><code>$whereArray = array('user_id'=&gt;5,'dept_id'=&gt;5);
  
  return DB::table('employees')-&gt;where($whereArray)-&gt;delete();
  </code></pre>
  
  <p>I know I can use multiple where conditions to achieve this. But for every time a new condition arrives I have to rewrite the function. And also I cannot use this function as dynamic one.</p>
  
  <p>
  So please help me this? How can achieve this using the array?
  </p>