| 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: | 2025-11-07 15:06:04 |
| Package Statistics | |
|---|---|
| Total Downloads: | 38,011 |
| Monthly Downloads: | 566 |
| Daily Downloads: | 37 |
| Total Stars: | 2 |
| Total Watchers: | 1 |
| Total Forks: | 0 |
| Total Open Issues: | 0 |
You can use trait in your models with "category_id" field (int)
#Installation
Require this package in your composer.json and update composer.
"kharanenka/laravel-scope-category-belongs-to": "1.0.*"
class MyModel extend Model {
use Kharanenka\Scope\CategoryBelongsTo;
...
}
$obElement = MyModel::getByCategory(10)->first();