kharanenka/laravel-scope-slug

Scope for field 'slug' (string)

1.0.0 2016-11-12 19:00 UTC

This package is auto-updated.

Last update: 2024-10-29 05:04:49 UTC


README

You can use trait in your models with "slug" field (string)

#Installation Require this package in your composer.json and update composer.

"kharanenka/laravel-scope-slug": "1.0.*"

Usage

    
    class MyModel extend Model {
    
        use Kharanenka\Scope\SlugField;
    
        ...
    
    }
    
    $obElement = MyModel::getBySlug('andrey')->first();
    $obElement = MyModel::nullSlug()->get();
    $obElement = MyModel::notNullSlug()->get();