How to make a dynamic prefix for the router?

There is a project in which it is necessary for some pages to display a prefix of a city name, ie:
There are URLs
/
/catalog
/delivery

And there are
/msk
/msk/catalog
/msg/delivery
/spb
/spb/catalog
/spb/delivery

Accordingly, all addresses must go in your controllers without regard to the prefix. How is this best implemented?
How to use dynamic prefix (including the need to exercise the option without the prefix) ?
A lot of different options tried, all works really awkward.
March 23rd 20 at 19:13
1 answer
March 23rd 20 at 19:15
Let the visitor chose a region, we code the region have put in him in the session.

Then you can do this:
Route::prefix(session('region_code'))->group(function() {
 Route::get('catalog', '...');
 // ...
});

Find more questions by tags Laravel