kharanenka / laravel-scope-active by Andrey Kharanenka

Scope for field 'active' (bool)
29,317
1
2
Package Data
Maintainer Username: Andrey Kharanenka
Maintainer Contact: kharanenka@gmail.com (Andrey Kharanenka)
Package Create Date: 2016-09-27
Package Last Update: 2016-11-12
Language: PHP
License: GPL-3.0
Last Refreshed: 2024-04-15 15:06:20
Package Statistics
Total Downloads: 29,317
Monthly Downloads: 440
Daily Downloads: 35
Total Stars: 1
Total Watchers: 2
Total Forks: 0
Total Open Issues: 0

Trait ActiveField

You can use trait in your models with "active" field (bool)

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


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

Usage


    
    class MyModel extend Model {
    
        use Kharanenka\Scope\ActiveField;
    
        ...
    
    }
    
    $obElement = MyModel::active()->first();
    $obElement = MyModel::notActive()->first();