title: Laravel - url parameters after?
body: <p>in Laravel, I want to be able to search user by id, or by name.</p>
  
  <p>I have following route:</p>
  
  <pre><code>Route::get('/user/{id}', 'UserController@getUserById')-&gt;name('user_by_id');
  </code></pre>
  
  <p>which in browser looks like this:</p>
  
  <pre><code>http://localhost:8000/user/1
  </code></pre>
  
  <p>As you can see, from the url it is not possible to determine, if passed value is id or name.</p>
  
  <p>So, what I am asking for are probably url parameters after <code>?</code> symbol.</p>
  
  <p>I want to have following urls:</p>
  
  <pre><code>http://localhost:8000/user?id=1
  http://localhost:8000/user?name=hans
  </code></pre>
  
  <p>but I have never found someone even mentioning this problem.</p>
  
  <p>Is this possible ?
  If not, or of it is not best practice, how to handle this properly ?</p>