belongsTo(User::class); } public function scopeType(Query $query,$type){ $query->where('type',$type); } }