Laravel Routing: Fallback Routes

Using the Route::fallback method, you may define a route that will be executed when no other route matches the incoming request.

Since you may define the fallback route within your routes/web.php file, all middleware in the web midddleware group will apply to the route.

Syntax

Route::fallback(function () {
    //
});

Laravel Routing: Fallback Routes — Structure map

Clickable & Draggable!

Laravel Routing: Fallback Routes — Related pages: