PHP Class Cviebrock\EloquentSluggable\SluggableObserver

Show file Open project: cviebrock/eloquent-sluggable

Public Methods

Method Description
__construct ( SlugService $slugService, Illuminate\Contracts\Events\Dispatcher $events ) SluggableObserver constructor.
saving ( Model $model ) : boolean | null

Protected Methods

Method Description
fireSluggedEvent ( Model $model, string $status ) : void Fire the namespaced post-validation event.
fireSluggingEvent ( Model $model, string $event ) : mixed Fire the namespaced validating event.
generateSlug ( Model $model, string $event ) : boolean | null

Method Details

__construct() public method

SluggableObserver constructor.
public __construct ( SlugService $slugService, Illuminate\Contracts\Events\Dispatcher $events )
$slugService Cviebrock\EloquentSluggable\Services\SlugService
$events Illuminate\Contracts\Events\Dispatcher

fireSluggedEvent() protected method

Fire the namespaced post-validation event.
protected fireSluggedEvent ( Model $model, string $status ) : void
$model Illuminate\Database\Eloquent\Model
$status string
return void

fireSluggingEvent() protected method

Fire the namespaced validating event.
protected fireSluggingEvent ( Model $model, string $event ) : mixed
$model Illuminate\Database\Eloquent\Model
$event string
return mixed

generateSlug() protected method

protected generateSlug ( Model $model, string $event ) : boolean | null
$model Illuminate\Database\Eloquent\Model
$event string
return boolean | null

saving() public method

public saving ( Model $model ) : boolean | null
$model Illuminate\Database\Eloquent\Model
return boolean | null