2017 © Pedro Peláez
 

library laravel-sluggable-trait

A trait you can apply to Eloquent models to have slugs automatically generated on save.

image

gurzhii/laravel-sluggable-trait

A trait you can apply to Eloquent models to have slugs automatically generated on save.

  • Wednesday, May 11, 2016
  • by Gurzhii
  • Repository
  • 0 Watchers
  • 0 Stars
  • 256 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Laravel Sluggable Trait

A trait you can apply to Eloquent models to have slugs automatically generated on save., (*1)

Installation

$ composer require gurzhii/laravel-sluggable-trait

Usage

<?php namespace App;

use Illuminate\Database\Eloquent\Model;
use MartinBean\Database\Eloquent\Sluggable;

class Item extends Model {

    use Sluggable;

}

By default, the trait assumes your database has two columns: name and slug. If you need to change these, you can do so via class constants:, (*2)

<?php namespace App;

use Illuminate\Database\Eloquent\Model;
use MartinBean\Database\Eloquent\Sluggable;

class Item extends Model {

    use Sluggable;

    const DISPLAY_NAME = 'headline';
    const SLUG = 'seo_url';

}

License

Licensed under the MIT Licence., (*3)

The Versions

11/05 2016

dev-master

9999999-dev

A trait you can apply to Eloquent models to have slugs automatically generated on save.

  Sources   Download

MIT

The Requires

 

by Gurzhii Dmitriy

laravel eloquent sluggable

22/04 2016

1.0.0

1.0.0.0

A trait you can apply to Eloquent models to have slugs automatically generated on save.

  Sources   Download

MIT

The Requires

 

by Gurzhii Dmitriy

laravel eloquent sluggable

17/02 2015

0.2.0

0.2.0.0

A trait you can apply to Eloquent models to have slugs automatically generated on save.

  Sources   Download

MIT

The Requires

 

laravel eloquent