title: How can I show two parameters in laravel api if they both match in the same row in the database
body: <p>in my database I have <code>$merchant_key</code> and <code>$reference_key</code>, both are not primary keys.</p>
  <p>I would like to return these if they match in the same row in JSON from my database. I tried a couple of ways but it shows the data even if the second parameter is wrong <code>$reference_key</code>. So if <code>$merchant_key</code> is correct and <code>$reference_key</code> is wrong it still shows.</p>
  <p>This is my API route</p>
  <pre><code>Route::get('Exttransfer/{reference}/{merchant_key}', 'UserController@show');
  </code></pre>
  <p>And The Function in Controller</p>
  <pre><code>public function show($reference,$merchant_key)
  {
      return Exttransfer::where('reference',$reference)-&gt;get();
      return Exttransfer::where('merchant_key',$merchant_key)-&gt;get();
      
  
  }
  </code></pre>