title: Eloquent build where query from array
body: <p>So I'm trying to prepare an Eloquent query from data in an associative array:</p>
  
  <pre><code>/* This works */
  $this
      -&gt;where("email", "me@gmail.com")
      -&gt;where("is_active", 1)
      -&gt;update($params);
  
  /* This doesn't work */
  $where = [
      'email' =&gt; "me@gmail.com",
      'is_active' =&gt; 1
  ];
  foreach ($where as $k =&gt; $v) {
      $this-&gt;where("{$k}", "{$v}");
  }
  $this-&gt;update($params);
  </code></pre>
  
  <p>Am I missing something?
  Any help appreciated.</p>
  
  <p>Edit: The query does not update the entity in the database.</p>
  
  <p>Ubuntu 18.10 (Cosmic Cuttlefish): 4.18.0-17-generic x86_64 bits: 64 Desktop: Gnome 3.30.2
  Laradock, Laravel 5.8.</p>