PHP 인터페이스 Cviebrock\EloquentTaggable\Taggable

파일 보기 프로젝트 열기: cviebrock/eloquent-taggable

공개 메소드들

메소드 설명
allTags ( ) : array Get an array of all tags used for the called class.
allTagsList ( ) : string Get all the tags used for the called class as a delimited string.
detag ( ) Remove all tags from the model.
getTagArrayAttribute ( ) : array Get all tags of a Model as an array.
getTagArrayNormalizedAttribute ( ) : array Get all normalized tags of a Model as an array.
getTagListAttribute ( ) : string Get all tags of a Model as a string in which the tags are delimited by the character defined in config('taggable.delimiters').
getTagListNormalizedAttribute ( ) : string Get all normalized tags of a Model as a string in which the tags are delimited by the character defined in config('taggable.delimiters').
retag ( string | array $tags ) Remove all Tags from a Model and assign the given ones.
scopeWithAllTags ( Builder $query, array | string $tags ) : Builder Scope for a Model that has all of the given tags.
scopeWithAnyTags ( Builder $query, array $tags = [] ) : Builder Scope for a Model that has any of the given tags.
scopeWithoutTags ( Builder $query ) : Builder Scope for a Model that doesn't have any tags.
tag ( string | array $tags ) Attach one or multiple Tags to a Model.
tags ( ) : Illuminate\Database\Eloquent\Relations\MorphToMany Get a collection of all Tags a Model has.
untag ( string | array $tags ) Detach one or multiple Tags from a Model.

보호된 메소드들

메소드 설명
addOneTag ( string $tagName ) Add one tag to the model.
removeOneTag ( string $tagName ) Remove one tag from the model

메소드 상세

addOneTag() 보호된 메소드

Add one tag to the model.
protected addOneTag ( string $tagName )
$tagName string

allTags() 공개 정적인 메소드

Get an array of all tags used for the called class.
public static allTags ( ) : array
리턴 array

allTagsList() 공개 정적인 메소드

Get all the tags used for the called class as a delimited string.
public static allTagsList ( ) : string
리턴 string

detag() 공개 메소드

Remove all tags from the model.
public detag ( )

getTagArrayAttribute() 공개 메소드

Get all tags of a Model as an array.
public getTagArrayAttribute ( ) : array
리턴 array

getTagArrayNormalizedAttribute() 공개 메소드

Get all normalized tags of a Model as an array.

getTagListAttribute() 공개 메소드

Get all tags of a Model as a string in which the tags are delimited by the character defined in config('taggable.delimiters').
public getTagListAttribute ( ) : string
리턴 string

getTagListNormalizedAttribute() 공개 메소드

Get all normalized tags of a Model as a string in which the tags are delimited by the character defined in config('taggable.delimiters').

removeOneTag() 보호된 메소드

Remove one tag from the model
protected removeOneTag ( string $tagName )
$tagName string

retag() 공개 메소드

Remove all Tags from a Model and assign the given ones.
public retag ( string | array $tags )
$tags string | array

scopeWithAllTags() 공개 메소드

Scope for a Model that has all of the given tags.
public scopeWithAllTags ( Builder $query, array | string $tags ) : Builder
$query Illuminate\Database\Eloquent\Builder
$tags array | string
리턴 Illuminate\Database\Eloquent\Builder

scopeWithAnyTags() 공개 메소드

Scope for a Model that has any of the given tags.
public scopeWithAnyTags ( Builder $query, array $tags = [] ) : Builder
$query Illuminate\Database\Eloquent\Builder
$tags array
리턴 Illuminate\Database\Eloquent\Builder

scopeWithoutTags() 공개 메소드

Scope for a Model that doesn't have any tags.
public scopeWithoutTags ( Builder $query ) : Builder
$query Illuminate\Database\Eloquent\Builder
리턴 Illuminate\Database\Eloquent\Builder

tag() 공개 메소드

Attach one or multiple Tags to a Model.
public tag ( string | array $tags )
$tags string | array

tags() 공개 메소드

Get a collection of all Tags a Model has.
public tags ( ) : Illuminate\Database\Eloquent\Relations\MorphToMany
리턴 Illuminate\Database\Eloquent\Relations\MorphToMany

untag() 공개 메소드

Detach one or multiple Tags from a Model.
public untag ( string | array $tags )
$tags string | array