kharanenka/laravel-scope-active
Scope for field 'active' (bool)
40,768
1
| Install | |
|---|---|
composer require kharanenka/laravel-scope-active |
|
| Latest Version: | 1.0.3 |
| PHP: | >=5.6 |
| License: | GPL-3.0 |
| Last Updated: | Nov 12, 2016 |
| Links: | GitHub · Packagist |
Maintainer: Andrey Kharanenka
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();