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-20 03:01:03 |
Package Statistics | |
---|---|
Total Downloads: | 32,495 |
Monthly Downloads: | 557 |
Daily Downloads: | 18 |
Total Stars: | 1 |
Total Watchers: | 2 |
Total Forks: | 0 |
Total Open Issues: | 0 |
You can use trait in your models with "code" field (string)
#Installation
Require this package in your composer.json
and update composer.
"kharanenka/laravel-scope-code": "1.0.*"
class MyModel extend Model {
use Kharanenka\Scope\CodeField;
...
}
$obElement = MyModel::getByCode('Andrey')->first();
$obElement = MyModel::likeByCode('And')->first();
$obElement = MyModel::nullCode()->get();
$obElement = MyModel::notNullCode()->get();