public function percantageCompleted() { if (!$this->allLeads() || !$this->allCompletedLeads()) { $totalPercentageLeads = 0; } else { $totalPercentageLeads = $this->allCompletedLeads() / $this->allLeads() * 100; } return $totalPercentageLeads; }