PHP Class Spatie\Sluggable\SlugOptions

Show file Open project: spatie/laravel-sluggable Class Usage Examples

Public Properties

Property Type Description
$generateSlugFrom string | array | callable
$generateSlugsOnCreate boolean
$generateSlugsOnUpdate boolean
$generateUniqueSlugs boolean
$maximumLength integer
$slugField string

Public Methods

Method Description
allowDuplicateSlugs ( ) : SlugOptions
create ( ) : SlugOptions
doNotGenerateSlugsOnCreate ( ) : SlugOptions
doNotGenerateSlugsOnUpdate ( ) : SlugOptions
generateSlugsFrom ( string | array | callable $fieldName ) : SlugOptions
saveSlugsTo ( string $fieldName ) : SlugOptions
slugsShouldBeNoLongerThan ( integer $maximumLength ) : SlugOptions

Method Details

allowDuplicateSlugs() public method

public allowDuplicateSlugs ( ) : SlugOptions
return SlugOptions

create() public static method

public static create ( ) : SlugOptions
return SlugOptions

doNotGenerateSlugsOnCreate() public method

public doNotGenerateSlugsOnCreate ( ) : SlugOptions
return SlugOptions

doNotGenerateSlugsOnUpdate() public method

public doNotGenerateSlugsOnUpdate ( ) : SlugOptions
return SlugOptions

generateSlugsFrom() public method

public generateSlugsFrom ( string | array | callable $fieldName ) : SlugOptions
$fieldName string | array | callable
return SlugOptions

saveSlugsTo() public method

public saveSlugsTo ( string $fieldName ) : SlugOptions
$fieldName string
return SlugOptions

slugsShouldBeNoLongerThan() public method

public slugsShouldBeNoLongerThan ( integer $maximumLength ) : SlugOptions
$maximumLength integer
return SlugOptions

Property Details

$generateSlugFrom public property

public string|array|callable $generateSlugFrom
return string | array | callable

$generateSlugsOnCreate public property

public bool $generateSlugsOnCreate
return boolean

$generateSlugsOnUpdate public property

public bool $generateSlugsOnUpdate
return boolean

$generateUniqueSlugs public property

public bool $generateUniqueSlugs
return boolean

$maximumLength public property

public int $maximumLength
return integer

$slugField public property

public string $slugField
return string