By-passing Laravel Nova catch-all routes

Published in Laravel Nova on Dec 19, 2020

Laravel Nova routes by default will register a catch-all route to intercept all GET requests and propagate it to Vue router.

However if you application need to define alternative catch-all routes as well for SPA or any other requirement you should be able to handle it via Laravel Fallback Routes

Route::fallback(function ($fallbackPlaceholder) {
    // ...
});

If you need to more control instead of $fallbackPlaceholder, you need to register the route manually and ends with where() and fallback():

Route::get('/{locale}/{page}', function ($locale, $page) {
    // 
})->where('locale', 'en|es')->fallback();