belongsTo(Nominee::class); } public function votes($nominee_id) { return $this->where('nominee_id','=',$nominee_id)->count(); } }