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