 <p>You can do like this.</p> <pre><code>public function index(Request $request) { // Handles requests such as ".../api/products?user_id=5&amp;price=500" $products = Product::where('user_id', $request-&gt;user_id)-&gt;where('price', '&lt;=', intval($request-&gt;price))-&gt;get(); return response()-&gt;json($products); } </code></pre> <p><strong>Or:</strong></p> <pre><code>public function index(Request $request) { // Handles requests such as ".../api/products?user_id=5&amp;price=500" $products = Product::whereRaw("user_id=? and price&lt;=?", [$request-&gt;user_id, $request-&gt;price])-&gt;get(); return response()-&gt;json($products); } </code></pre> <p><strong><em>Edit after @Joel Hinz comment:</em></strong></p> <p>If you want also to pass the operator of the query you can add a new parameter to the url, for example</p> <pre><code>/api/products?user_id=5&amp;price=500&amp;op=1 </code></pre> <p>Then switch the number in the controller.</p> <pre><code>public function index(Request $request) { // Handles requests such as ".../api/products?user_id=5&amp;price=500&amp;op=1" switch(intval($request-&gt;op)){ case 1: $op = "&lt;="; break; case 2: $op = "&gt;"; break; //and so on default: return response()-&gt;json("Wrong parameters"); break; } $products = Product::whereRaw("user_id = ? and price $op ?", [$request-&gt;user_id, $request-&gt;price])-&gt;get(); return response()-&gt;json($products); } </code></pre>