title: How to change ID to product name in URL - Laravel
body: <p>How can I replace ID with actual product name in the URL. For example instead of:</p>
  
  <pre><code>www.myapp.com/product/421156
  </code></pre>
  
  <p>or in general (from routes file)</p>
  
  <pre><code>Route::get('/product/{productID}');
  </code></pre>
  
  <p>to</p>
  
  <pre><code>www.myapp.com/product/sony-playstation-4
  </code></pre>
  
  <p>Of course, 421156 is an ID of Sony PS4.</p>