Tailor\Classes\Scopes\VersionableScope

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 query builder with the needed functions.

Protected Methods

protected addWithOnlyVersions()

protected addWithOnlyVersions($builder): void

addWithOnlyVersions includes only drafts in the query.

protected addWithVersions()

protected addWithVersions($builder): void

addWithVersions removes this scope and includes everything.