You can also catch "everything" using a regular expression for a parameter.
Route::group(['prefix' => 'premium-section'], function () { // other routes ... Route::get('{any}', function ($any) { ... })->where('any', '.*'); });
You can also catch the entire group if no routes are defined with an optional parameter.
Route::get('{any?}', function ($any = null) { ... })->where('any', '.*');
This last one will catch "domain.com/premium-section".
lagbox
source share