title: How to extend Laravel's basic route resource in Laravel 6?
body: <p>I'm using Laravel as an API with many endpoints and many controllers. I'm using <code>Route::resource()</code> method to define REST endpoints, but in most cases I need to add one more endpoint and now my code is looking like this:</p>
  
  <pre class="lang-php prettyprint-override"><code>Route::get('product/list', 'ProductController@all');
  Route::resource('product', 'ProductController');
  
  Route::get('property/list', 'PropertyController@all');
  Route::resource('property', 'PropertyController');
  
  Route::get('customer/list', 'CustomerController@all');
  Route::resource('customer', 'CustomerController');
  </code></pre>
  
  <p>...and this sample keeps coming up, over and over again. I think there needs to be a practical and better way to define this <code>{resource}/list</code> URI in one place. Now I need to repeat this sample:</p>
  
  <p><code>Route::get('{resource}/list', 'NameOfController@all');</code></p>
  
  <p>Is there a better solution to define this endpoint only once and be available in every controllers? Can I avoid somehow the repetition?</p>