Hi Folks,
I’m trying to use a class to render partials throughout my site:
I have this main class, payment.php
class Payment {
private function GetUserPayments($isPaid = false)
{
//eloquent stuff
return $results
}
}
I would like to reuse this throughout my site in my controller, something like this:
public function getPendingPayments()
{
$payments = $this->Payments::GetUserPayments(true);
return View::make(
'layouts.parents.pending-payments',
array('payments' => $payments) );
}
I am getting an error: PHP Parse error: syntax error, unexpected ‘::’.
Can anyone please pointme in the right direction, how could I resuse this class throughout my controller?
Many thanks