• 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 addWithDrafts()

protected addWithDrafts($builder): void

addWithDrafts removes this scope and includes everything.

protected addWithOnlyDrafts()

protected addWithOnlyDrafts($builder): void

addWithOnlyDrafts includes only drafts in the query.

protected addWithSavedDrafts()

protected addWithSavedDrafts($builder): void

addWithSavedDrafts will exclude unsaved drafts.