instance('controllerRunsInTenantContext', tenancy()->initialized); $this->middleware(AdditionalMiddleware::class); } public function computePost(Post $post, Comment|null $comment = null): string { $post = $post->title; $comment = $comment ? '-' . $comment->comment : ''; return $post . $comment; } public function index(): string { return $this->service->token; } public function routeHasTenantParameter(Request $request): bool { return $request->route()->hasParameter(PathTenantResolver::tenantParameterName()); } }