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

Minor tweaks

- tightens up path logic
- adds return type
- more specific doc block description
This commit is contained in:
Dustin Fraker 2019-10-20 07:44:27 -06:00 committed by GitHub
parent acd9d99ccb
commit b0cc81024a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 * @param String $path
* @return string * @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'); $url = $this->app->config->get('app.url');
$subdomain = $this->domains[0]; $subdomain = $this->domains[0];