1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 21:34:03 +00:00

Add note about clearing the $routesToClone property

This commit is contained in:
lukinovec 2025-06-24 14:40:28 +02:00
parent 0bd5872a0f
commit 6f760ef4cd

View file

@ -61,6 +61,11 @@ use Stancl\Tenancy\Resolvers\PathTenantResolver;
* $cloneAction->cloneRoute('baz')->handle();
* ```
*
* Calling handle() will also clear the $routesToClone array, so that subsequent handle() calls aren't broken.
* This means that $action->cloneRoute('foo')->handle() will clone the 'foo' route, but subsequent calls to handle() will behave
* as if cloneRoute() wasn't called at all ($routesToClone will be empty).
* Note that calling handle() does not reset the other properties.
*
* @see Stancl\Tenancy\Resolvers\PathTenantResolver
*/
class CloneRoutesAsTenant