1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-13 04:04:04 +00:00

Fix #998, properly replace ALL tenant_id literals

This commit is contained in:
Samuel Štancl 2022-11-10 16:44:52 +01:00
parent 8a00a105d0
commit 2a39b0526a
11 changed files with 35 additions and 22 deletions

View file

@ -105,6 +105,12 @@ class Tenancy
return $model;
}
/** Name of the column used to relate models to tenants. */
public static function tenantKeyColumn(): string
{
return config('tenancy.models.tenant_key_column') ?? 'tenant_id';
}
/**
* Try to find a tenant using an ID.
*