[Feature Request] - Allow changing `team` to `organization`
bretterer opened this issue · comments
It would be great to provide an option to change team
to something else like organization
.
In many applications I build, I like the Team
options, but Team does not always work for me. I'd like the ability to change things like the route names, url structure, and hard coded strings easily through an environment variable or configuration option.
'JETSTREAM_TEAM_MAPPING' => 'organization'
or something like this.
I do understand that this change would not update the function names, and possibly not even the table/column names.
Is this something that would be useful for others or even something that would be considered, even if I provided the work for it?
Can't you already do that? Once the stubs are published you can do with them what you want.
@driesvints AFAICT, its not possible to update the route names or paths as those are pulled in directly from the vendor directory. There are also a handfull of places where its not "published stubs" such as /src/Actions/ValidateTeamDeletion
where the message for the throws exception specifies team
. The language files would all need to be updated for each case, but there is no definition of what I would need to do for that.
Additionally, in the views that are published, it would be great if the property that was passed was the wanted property. Currently those are hard coded to team
but if you are wanting to use the organization
naming, that can get a bit confusing.
But does the code really matter? As long as you can update the UI to what you want?
+1 for organizations.
btw I dont undertand the benefit and effort to kill the social part of github issues. +1 to let issues open, with the right tags, for people to comment, to make their questions and learn.
@driesvints Route names matter to me.... if my verbage in UI is organizations, but the route/uri is /teams
. that can be confusing to customers.
I tried publishing the routes file, but it does not seem to pull that in correctly. It would be great to have the library be customizable fully for this kind of thing.
But you have control over the routes? You can use ignoreRoutes
and use your own:
https://github.com/laravel/jetstream/blob/5.x/src/Jetstream.php#L484C28-L484C40