kharanenka / laravel-scope-slug by Andrey Kharanenka

Scope for field 'slug' (string)
32,466
1
2
Package Data
Maintainer Username: Andrey Kharanenka
Maintainer Contact: kharanenka@gmail.com (Andrey Kharanenka)
Package Create Date: 2016-11-12
Package Last Update: 2016-11-12
Language: PHP
License: GPL-3.0
Last Refreshed: 2024-12-22 03:15:34
Package Statistics
Total Downloads: 32,466
Monthly Downloads: 555
Daily Downloads: 14
Total Stars: 1
Total Watchers: 2
Total Forks: 0
Total Open Issues: 0

Trait SlugField

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();