Méthode |
Description |
|
addTag ( string $name ) : void |
Attaches the given tag to the entity. |
|
allTags ( ) : Builder |
Returns all the tags under the entity namespace. |
|
createTagsModel ( ) : Model |
Creates a new model instance. |
|
getSlugGenerator ( ) : string |
Returns the slug generator. |
|
getTagsDelimiter ( ) : string |
Returns the tags delimiter. |
|
getTagsModel ( ) : string |
Returns the Eloquent tags model name. |
|
prepareTags ( string | array $tags ) : array |
Prepares the given tags before being saved. |
|
removeTag ( string $name ) : void |
Detaches the given tag from the entity. |
|
scopeWhereTag ( Builder $query, string | array $tags, string $type = 'slug' ) : Builder |
Returns the entities with only the given tags. |
|
scopeWithTag ( Builder $query, string | array $tags, string $type = 'slug' ) : Builder |
Returns the entities with one of the given tags. |
|
scopeWithoutTag ( Builder $query, string | array $tags, string $type = 'slug' ) : Builder |
Returns the entities that do not have one of the given tags. |
|
setSlugGenerator ( string $name ) : void |
Sets the slug generator. |
|
setTags ( string | array $tags, string $type = 'name' ) : boolean |
Attaches or detaches the given tags. |
|
setTagsDelimiter ( string $delimiter ) |
Sets the tags delimiter. |
|
setTagsModel ( string $model ) : void |
Sets the Eloquent tags model name. |
|
tag ( string | array $tags ) : boolean |
Attaches multiple tags to the entity. |
|
tags ( ) : Illuminate\Database\Eloquent\Relations\MorphToMany |
Returns the entity Eloquent tag model object. |
|
untag ( string | array | null $tags = null ) : boolean |
Detaches multiple tags from the entity or if no tags are
passed, removes all the attached tags from the entity. |
|