From b0cc81024a3ce922a105843b46ef88d6809ca95b Mon Sep 17 00:00:00 2001 From: Dustin Fraker Date: Sun, 20 Oct 2019 07:44:27 -0600 Subject: [PATCH] Minor tweaks - tightens up path logic - adds return type - more specific doc block description --- src/Tenant.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Tenant.php b/src/Tenant.php index ac4dbf33..ff9133cd 100644 --- a/src/Tenant.php +++ b/src/Tenant.php @@ -385,14 +385,14 @@ class Tenant implements ArrayAccess } /** - * Get a route specific to this tenant. + * Generate a route specific to this tenant with the given path. * * @param String $path * @return string */ - public function route($path) + public function route($path): string { - $path = $path[0] !== '/' ? '/'.$path : $path; + $path = $path[0] === '/' ?: sprintf('/%s', $path); $url = $this->app->config->get('app.url'); $subdomain = $this->domains[0];