PHP Interface Esensi\Model\Contracts\SluggableModelInterface

Author: Daniel LaBarge ([email protected])
Show file Open project: esensi/model

Public Methods

Method Description
getSlugAttribute ( ) : string Get the value assigned to the sluggable key.
getSlugKey ( ) : string Get the key that defines the model's sluggable attribute.
makeSlug ( string $value ) : string Convert the value into a slug using a regexp replacement.
setSlugAttribute ( string $value ) Mutate the value to a slug format and assign to the sluggable key.
setSlugKey ( string $key ) : Illuminate\Database\Eloquent\Model Set the key that defines the model's sluggable attribute.

Method Details

getSlugAttribute() public method

Get the value assigned to the sluggable key.
public getSlugAttribute ( ) : string
return string

getSlugKey() public method

Get the key that defines the model's sluggable attribute.
public getSlugKey ( ) : string
return string

makeSlug() public method

Convert the value into a slug using a regexp replacement.
public makeSlug ( string $value ) : string
$value string
return string

setSlugAttribute() public method

Mutate the value to a slug format and assign to the sluggable key.
public setSlugAttribute ( string $value )
$value string

setSlugKey() public method

Set the key that defines the model's sluggable attribute.
public setSlugKey ( string $key ) : Illuminate\Database\Eloquent\Model
$key string
return Illuminate\Database\Eloquent\Model