mx13/slugable

A package to add slug functionality to an Eloquent model

1.0.0 2019-09-20 15:18 UTC

This package is auto-updated.

Last update: 2024-04-21 01:13:26 UTC


README

Introduction

A package to add slug functionality to an Eloquent model.

Installation

Install the package through Composer.

Run the Composer require command from the Terminal:

 composer require mx13/slugable

Usage

  • The Eloquent model should implement the \MX13\Slugable\SlugInterface contract which enforces implementing the getSlugColumn() 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.