protected static function boot()
    {
        parent::boot();

        static::saving(function (Article $article) {
            $article->slug = $article->computeSlug();
        });
    }
protected static function boot()
    {
        parent::boot();

        static::saving(function (Article $article) {
            $article->slug = $article->computeSlug();
        });
    }
protected static function boot ( ) { parent :: boot ( ) ; static :: saving ( function ( Article $ article ) { $ article -> slug = $ article -> computeSlug ( ) ; } ) ; }
Boot model.
Boot model .