mirror of
https://github.com/archtechx/tenancy.git
synced 2026-05-06 17:04:04 +00:00
Use $query parameter instead of $builder in the where() closure
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
eed66c93f1
commit
c81ab75421
1 changed files with 3 additions and 3 deletions
|
|
@ -58,9 +58,9 @@ class PendingScope implements Scope
|
||||||
{
|
{
|
||||||
$builder->macro('withoutPending', function (Builder $builder) {
|
$builder->macro('withoutPending', function (Builder $builder) {
|
||||||
$builder->withoutGlobalScope(static::class)
|
$builder->withoutGlobalScope(static::class)
|
||||||
->where(function (Builder $builder) {
|
->where(function (Builder $query) {
|
||||||
$builder->whereNull($builder->getModel()->getColumnForQuery('pending_since'))
|
$query->whereNull($query->getModel()->getColumnForQuery('pending_since'))
|
||||||
->orWhereNull($builder->getModel()->getDataColumn());
|
->orWhereNull($query->getModel()->getDataColumn());
|
||||||
});
|
});
|
||||||
|
|
||||||
return $builder;
|
return $builder;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue