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

Delete double // from cloning example in TSP stub

This commit is contained in:
lukinovec 2025-07-04 12:03:53 +02:00
parent f57536c5a6
commit 466e4fbe1a

View file

@ -227,23 +227,23 @@ class TenancyServiceProvider extends ServiceProvider
/** @var CloneRoutesAsTenant $cloneRoutes */ /** @var CloneRoutesAsTenant $cloneRoutes */
$cloneRoutes = $this->app->make(CloneRoutesAsTenant::class); $cloneRoutes = $this->app->make(CloneRoutesAsTenant::class);
// // The cloning action has two modes: // The cloning action has two modes:
// // 1. Clone all routes that have the middleware present in the action's $cloneRoutesWithMiddleware property. // 1. Clone all routes that have the middleware present in the action's $cloneRoutesWithMiddleware property.
// // You can customize the middleware that triggers cloning by using cloneRoutesWithMiddleware() on the action. // You can customize the middleware that triggers cloning by using cloneRoutesWithMiddleware() on the action.
// // //
// // By default, the middleware is ['clone'], but using $cloneRoutes->cloneRoutesWithMiddleware(['clone', 'universal'])->handle() // By default, the middleware is ['clone'], but using $cloneRoutes->cloneRoutesWithMiddleware(['clone', 'universal'])->handle()
// // will clone all routes that have either 'clone' or 'universal' middleware (mentioning 'universal' since that's a common use case). // will clone all routes that have either 'clone' or 'universal' middleware (mentioning 'universal' since that's a common use case).
// // //
// // Also, you can use the shouldClone() method to provide a custom closure that determines if a route should be cloned. // Also, you can use the shouldClone() method to provide a custom closure that determines if a route should be cloned.
// // //
// // 2. Clone only the routes that were manually added to the action using cloneRoute(). // 2. Clone only the routes that were manually added to the action using cloneRoute().
// // //
// // Regardless of the mode, you can provide a custom closure for defining the cloned route, e.g.: // Regardless of the mode, you can provide a custom closure for defining the cloned route, e.g.:
// $cloneRoutesAction->cloneUsing(function (Route $route) { // $cloneRoutesAction->cloneUsing(function (Route $route) {
// RouteFacade::get('/cloned/' . $route->uri(), fn () => 'cloned route')->name('cloned.' . $route->getName()); // RouteFacade::get('/cloned/' . $route->uri(), fn () => 'cloned route')->name('cloned.' . $route->getName());
// })->handle(); // })->handle();
// // This will make all cloned routes use the custom closure to define the cloned route instead of the default behavior. // This will make all cloned routes use the custom closure to define the cloned route instead of the default behavior.
// // See Stancl\Tenancy\Actions\CloneRoutesAsTenant for more details. // See Stancl\Tenancy\Actions\CloneRoutesAsTenant for more details.
$cloneRoutes->handle(); $cloneRoutes->handle();
} }