mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 07:54:03 +00:00
Minor tweaks
- tightens up path logic - adds return type - more specific doc block description
This commit is contained in:
parent
acd9d99ccb
commit
b0cc81024a
1 changed files with 3 additions and 3 deletions
|
|
@ -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];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue