mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-18 03:44:03 +00:00
Fix #998, properly replace ALL tenant_id literals
This commit is contained in:
parent
8a00a105d0
commit
2a39b0526a
11 changed files with 35 additions and 22 deletions
|
|
@ -7,7 +7,7 @@ namespace Stancl\Tenancy\Database;
|
|||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Scope;
|
||||
use Stancl\Tenancy\Database\Concerns\BelongsToTenant;
|
||||
use Stancl\Tenancy\Tenancy;
|
||||
|
||||
class TenantScope implements Scope
|
||||
{
|
||||
|
|
@ -17,7 +17,7 @@ class TenantScope implements Scope
|
|||
return;
|
||||
}
|
||||
|
||||
$builder->where($model->qualifyColumn(BelongsToTenant::tenantIdColumn()), tenant()->getTenantKey());
|
||||
$builder->where($model->qualifyColumn(Tenancy::tenantKeyColumn()), tenant()->getTenantKey());
|
||||
}
|
||||
|
||||
public function extend(Builder $builder): void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue