public static function boot() { parent::boot(); Tag::creating(function (Tag $tag) { $tag->generateSlug(); }); }