PublishedScope
class PublishedScope implements Scope (View source)
Properties
protected array | $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.
void
addWithDrafts(Builder $builder)
Add the with-drafts extension to the builder.
void
addOnlyPublished(Builder $builder)
Add the only-published extension to the builder.
void
addOnlyDrafts(Builder $builder)
Add the only-drafts extension to the builder.
Details
at line 26
void
apply(Builder $builder, Model $model)
Apply the scope to a given Eloquent query builder.
at line 38
void
extend(Builder $builder)
Extend the query builder with the needed functions.
at line 52
protected void
addWithDrafts(Builder $builder)
Add the with-drafts extension to the builder.
at line 66
protected void
addOnlyPublished(Builder $builder)
Add the only-published extension to the builder.
at line 86
protected void
addOnlyDrafts(Builder $builder)
Add the only-drafts extension to the builder.