12/11
2016
Wallogit.com
2017 © Pedro Peláez
Scope for field 'category_id' (int)
You can use trait in your models with "category_id" field (int), (*1)
Require this package in your composer.json and update composer., (*2)
"kharanenka/laravel-scope-category-belongs-to": "1.0.*"
class MyModel extend Model { use Kharanenka\Scope\CategoryBelongsTo; ... } $obElement = MyModel::getByCategory(10)->first();