1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-05-06 19:24:04 +00:00

Improve wording

This commit is contained in:
lukinovec 2026-04-21 13:46:26 +02:00
parent 61bf6dc561
commit ac90ef08e4
2 changed files with 5 additions and 4 deletions

View file

@ -22,7 +22,8 @@ use Stancl\Tenancy\Resolvers\RequestDataTenantResolver;
* - Automatically passing ['tenant' => ...] to each route() call -- if TenancyUrlGenerator::$passTenantParameterToRoutes is enabled * - Automatically passing ['tenant' => ...] to each route() call -- if TenancyUrlGenerator::$passTenantParameterToRoutes is enabled
* This is a more universal solution since it supports both path identification and query parameter identification. * This is a more universal solution since it supports both path identification and query parameter identification.
* *
* - Prepends route names with `tenant.` (or the configured prefix) if $prefixRouteNames is enabled. * - Prepends route names with the tenant route name prefix ('tenant.' by default,
* configurable at tenant_route_name_prefix under PathTenantResolver) if $prefixRouteNames is enabled.
* This is primarily useful when using route cloning with path identification. * This is primarily useful when using route cloning with path identification.
* *
* Affected methods: route(), toRoute(), temporarySignedRoute(), signedRoute() (the last two via the route() override). * Affected methods: route(), toRoute(), temporarySignedRoute(), signedRoute() (the last two via the route() override).
@ -131,8 +132,8 @@ class TenancyUrlGenerator extends UrlGenerator
} }
/** /**
* Override the toRoute() method so that the route name gets prefixed * Override the toRoute() to prefix the route name
* and the tenant parameter gets added when in tenant context. * and add the tenant parameter when in tenant context.
* *
* Also affects route(). Even though route() is overridden separately, it delegates parameter handling to toRoute(). * Also affects route(). Even though route() is overridden separately, it delegates parameter handling to toRoute().
*/ */

View file

@ -402,7 +402,7 @@ test('the bypass parameter works correctly with temporarySignedRoute', function(
->not()->toContain('central='); // Bypass parameter gets removed from the generated URL ->not()->toContain('central='); // Bypass parameter gets removed from the generated URL
}); });
test('the toRoute method can automatically prefix the passed route name', function () { test('toRoute can automatically prefix the passed route name', function () {
config(['tenancy.bootstrappers' => [UrlGeneratorBootstrapper::class]]); config(['tenancy.bootstrappers' => [UrlGeneratorBootstrapper::class]]);
Route::get('/central/home', fn () => 'central')->name('home'); Route::get('/central/home', fn () => 'central')->name('home');