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

Adapt tenant_asset for path identification

This commit is contained in:
Craig Riley 2023-06-11 01:26:31 +01:00 committed by GitHub
parent d9b7107900
commit 212653e245
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -36,9 +36,11 @@ if (! function_exists('tenant')) {
if (! function_exists('tenant_asset')) {
/** @return string */
function tenant_asset($asset)
function tenant_asset($asset, $usePathIdentification = false)
{
return route('stancl.tenancy.asset', ['path' => $asset]);
return $usePathIdentification === true ?
route('stancl.tenancy.asset.path', ['path' => $asset, 'tenant' => tenant(tenant()->getTenantKeyName())]) :
route('stancl.tenancy.asset', ['path' => $asset]);
}
}