public function activity() { return $this->hasMany(Activity::class, 'type_id', 'id')->where('type', 'lead'); }