1
0
Fork 0
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:
lukinovec 2026-04-22 13:36:01 +02:00 committed by GitHub
parent eed66c93f1
commit c81ab75421
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;