Building where query based on input
<pre><code>matchthese=['name'=&gt; Input::get('name'),];
Matchthose['place'=&gt; Input::get('place')];
$Select_db = Db::table('actvities')
              -&gt;where([[matchthese],[matchthose]])
              -&gt;orwhere('place', Input::get('place'))
              -&gt;orwhere('color', Input::get('color'))
              -&gt;orwhere('people',Input::get('people'))
              -&gt;get();
</code></pre>

<p>But the orwhere doesn't work correctly.I want the first one or the second one etc.How should i do this to work?</p>