<?php
namespace Komma\KMS\Core;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Str;
use Komma\KMS\Core\HasSlugInterface;
/**
* Trait SuggestSlugTrait
*
* Provides a default trait to conform to the HasSlugInterface contract.
*
* @see HasSlugInterface
* @mixin Model
*/
trait SuggestSlugTrait {
public function suggestSlug(): string
{
return Str::slug($this->name);
}
}