mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 14:54:03 +00:00
Improve getTenants condition
This commit is contained in:
parent
95eb49a3d3
commit
4d7831d6f6
1 changed files with 1 additions and 1 deletions
|
|
@ -27,7 +27,7 @@ trait HasTenantOptions
|
|||
->when($this->option('tenants'), function ($query) {
|
||||
$query->whereIn(tenancy()->model()->getTenantKeyName(), $this->option('tenants'));
|
||||
})
|
||||
->when(tenancy()->model()::hasGlobalScope(PendingScope::class), function ($query) {
|
||||
->when(! is_null($this->option('with-pending')) && tenancy()->model()::hasGlobalScope(PendingScope::class), function ($query) {
|
||||
$query->withPending($this->option('with-pending'));
|
||||
})
|
||||
->cursor();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue