class SoftDeletingScope implements Scope

Properties

protected string[] $extensions

All of the extensions to be added to the builder.

Methods

void
apply(Builder $builder, Model $model)

Apply the scope to a given Eloquent query builder.

void
extend(Builder $builder)

Extend the query builder with the needed functions.

string
getDeletedAtColumn(Builder $builder)

Get the "deleted at" column for the builder.

void
addRestore(Builder $builder)

Add the restore extension to the builder.

void
addRestoreOrCreate(Builder $builder)

Add the restore-or-create extension to the builder.

void
addCreateOrRestore(Builder $builder)

Add the create-or-restore extension to the builder.

void
addWithTrashed(Builder $builder)

Add the with-trashed extension to the builder.

void
addWithoutTrashed(Builder $builder)

Add the without-trashed extension to the builder.

void
addOnlyTrashed(Builder $builder)

Add the only-trashed extension to the builder.

Details

at line 24
void apply(Builder $builder, Model $model)

Apply the scope to a given Eloquent query builder.

Parameters

Builder $builder
Model $model

Return Value

void

at line 34
void extend(Builder $builder)

Extend the query builder with the needed functions.

Parameters

Builder $builder

Return Value

void

at line 54
protected string getDeletedAtColumn(Builder $builder)

Get the "deleted at" column for the builder.

Parameters

Builder $builder

Return Value

string

at line 68
protected void addRestore(Builder $builder)

Add the restore extension to the builder.

Parameters

Builder $builder

Return Value

void

at line 82
protected void addRestoreOrCreate(Builder $builder)

Add the restore-or-create extension to the builder.

Parameters

Builder $builder

Return Value

void

at line 98
protected void addCreateOrRestore(Builder $builder)

Add the create-or-restore extension to the builder.

Parameters

Builder $builder

Return Value

void

at line 114
protected void addWithTrashed(Builder $builder)

Add the with-trashed extension to the builder.

Parameters

Builder $builder

Return Value

void

at line 131
protected void addWithoutTrashed(Builder $builder)

Add the without-trashed extension to the builder.

Parameters

Builder $builder

Return Value

void

at line 150
protected void addOnlyTrashed(Builder $builder)

Add the only-trashed extension to the builder.

Parameters

Builder $builder

Return Value

void