A package to add slug functionality to an Eloquent model.
Install the package through Composer.
Run the Composer require command from the Terminal:
composer require mx13/slugable
- The Eloquent model should implement the
\MX13\Slugable\SlugInterface
contract which enforces implementing thegetSlugColumn()
method which returns the name of the slug column. - The Eloquent model should use
\MX13\Slugable\Slugable
trait which has all the functionality needed to make the Eloquent model slugable.