Contents

October\Rain\Database\Scopes\MultisiteGroupScope

Overview

MultisiteGroupScope applies site group scoping to models that use the MultisiteGroup trait. Unlike MultisiteScope which filters by individual site_id, this scope filters by site_group_id to scope records to a tenant.

Implements
  • Illuminate\Database\Eloquent\Scope

Protected Properties

protected array $extensions

extensions to be added to the builder.


Public Methods

public apply()

public apply($builder, $model): void

apply the scope to a given Eloquent query builder.

public extend()

public extend($builder): void

extend the Eloquent query builder.

Protected Methods

protected addWithSiteGroup()

protected addWithSiteGroup($builder): void

addWithSiteGroup removes this scope and includes the specified site group

protected addWithSiteGroups()

protected addWithSiteGroups($builder): void

addWithSiteGroups removes this scope and includes everything, or filters by an array of group ids.