laravel / jetstream

Tailwind scaffolding for the Laravel framework.

Home Page:https://jetstream.laravel.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow Prefixing of UI Routes

robertdeboer opened this issue · comments

What:

It would be beneficial to be able to set a Prefix for all the UI routes for Jetstream. While you can set a prefix for Fortify routes there is no current way to do this for the UI components (profile page, etc) without publishing the routes file and disabling the default routes from Jetstream. This seems counter-productive when all you want to do is add a simple "prefix" option to the main Jetstream routes group. This also seems half-implemented when you can do the same for the Fortify portion of this but not this portion.

Why:

I currently manage a system of servers that support one main server. Due to DNS being out of my control and limited, I only have the use of the main domain name. This means all of the support systems are accessed by URL, not by sub-domain. Example: the main application is www.myapplication.com and the reporting server is at www.myapplication.com/reporting

This means for the reporting server everything must be prefixed by /reporting for routes, assets, etc, to work.

How:

  • Add a config prefix to the config/jetstream.php file with a default value
  • In the jetstream.php routes file add 'prefix' => config('jetstream.path') to the main route group

I have used this approach multiple times and it seams like an easy win to add a useful feature.

Thanks. Right now we have no plans for this sorry. Once your scaffold is complete, you can change all routes to the ones you wish.