title: Load backend and frontend routes separately without interfering
body: <p>I have two kind of routes, admin routes and frontend routes.</p>
  
  <p>The frontend routes</p>
  
  <pre><code>Route::get('{locale?}/', ['uses' =&gt; '\App\Http\Controllers\loadViewController@home']);
  Route::get('{locale?}/{page}', ['uses' =&gt; '\App\Http\Controllers\loadViewController@index']);
  Route::get('{locale?}/{template?}/{page}', ['uses' =&gt; '\App\Http\Controllers\loadViewController@detail']);
  </code></pre>
  
  <p>The backend routes</p>
  
  <pre><code>Route::prefix('admin/dashboard')-&gt;group(function () {
    Route::get('/', 'DashboardController@index')-&gt;name('dashboard'); 
  });
  </code></pre>
  
  <p>Now when i type admin/dashboard or api/admin, laravel uses the frontend routes to load the views, while i want the backend views to be loaded.</p>
  
  <p>So to filter out the backend routes i tried this</p>
  
  <pre><code>Route::group(['where' =&gt; ['page' =&gt; '^(?!admin|api)$', 'template' =&gt; '^(?!admin|api)$']], function ({
    Route::get('{locale?}/', ['uses' =&gt; '\App\Http\Controllers\loadViewController@home']);
    Route::get('{locale?}/{page}', ['uses' =&gt; '\App\Http\Controllers\loadViewController@index']);
    Route::get('{locale?}/{template?}/{page}', ['uses' =&gt; '\App\Http\Controllers\loadViewController@detail']); 
  });
  </code></pre>
  
  <p>which obviously did not work</p>
  
  <p>Also the frontend routes should not have something like <strong>/website</strong>, they should all start with <strong>/</strong></p>
  
  <p>My question is: How can i load the backend and frontend routes separately without interfering when called, even if they have the same url length in terms of parameters, keep in mind that the admin routes always start with /admin or /api.</p>
  
  <p>Note: i can't put the backend routes before the frontend routes</p>
  
  <p>Thanks in advance!</p>