PHP Class Nanigans\SingleTableInheritance\SingleTableInheritanceScope

Inheritance: implements Illuminate\Database\Eloquent\ScopeInterface
Afficher le fichier Open project: nanigans/single-table-inheritance

Méthodes publiques

Méthode Description
apply ( Builder $builder, Model $model ) : void Apply the scope to a given Eloquent query builder.
remove ( Builder $builder, Model $model ) : void Remove the scope from the given Eloquent query builder.

Méthodes protégées

Méthode Description
isSingleTableInheritanceConstraint ( array $where, string $column ) : boolean Determine if the given where clause is a single table inheritance constraint.

Method Details

apply() public méthode

Apply the scope to a given Eloquent query builder.
public apply ( Builder $builder, Model $model ) : void
$builder Illuminate\Database\Eloquent\Builder
$model Illuminate\Database\Eloquent\Model
Résultat void

isSingleTableInheritanceConstraint() protected méthode

Determine if the given where clause is a single table inheritance constraint.
protected isSingleTableInheritanceConstraint ( array $where, string $column ) : boolean
$where array
$column string
Résultat boolean

remove() public méthode

Remove the scope from the given Eloquent query builder.
public remove ( Builder $builder, Model $model ) : void
$builder Illuminate\Database\Eloquent\Builder
$model Illuminate\Database\Eloquent\Model
Résultat void