Derive the router base from the current URL at boot.
resolveBase({ url: '/whatever' }) → '/whatever'
resolveBase({ prefix: '/admin', locales: ['it','en'] })
on /admin/it/catalog → '/admin/it'
on /admin/catalog (locale optional) → '/admin'
resolveBase({ locales: ['it','en'] }) (no prefix)
on /en/checkout → '/en'
on /checkout → ''
The locale segment lives in the BASE, not in route paths — the table stays
locale-free, one generated module serves every locale, and Blade-inlined
payloads can localize titles per request.
Derive the router base from the current URL at boot.
resolveBase({ url: '/whatever' }) → '/whatever' resolveBase({ prefix: '/admin', locales: ['it','en'] }) on /admin/it/catalog → '/admin/it' on /admin/catalog (locale optional) → '/admin' resolveBase({ locales: ['it','en'] }) (no prefix) on /en/checkout → '/en' on /checkout → ''
The locale segment lives in the BASE, not in route paths — the table stays locale-free, one generated module serves every locale, and Blade-inlined payloads can localize titles per request.