public function getContributors() { $campaignid = Input::get('campaignid'); $donation = new Donations(); $result = $donation->getContributors($campaignid); //dd($result); if ($result) { $str = ""; foreach ($result as $row) { $str .= "<a style='font-weight:lighter;' href='/" . $row->username . "' class='label label-important'><strong><i class='icon-tag'></i> " . $row->username . "</strong></a> "; } return $str; } else { return "<strong style='font-weight:lighter;'>No contributors yet.</strong>"; } }