use trait instead of function
This commit is contained in:
parent
a2b17eaab5
commit
9fd9677a2f
@ -82,17 +82,17 @@ abstract class Report
|
|||||||
|
|
||||||
public function getCustomers()
|
public function getCustomers()
|
||||||
{
|
{
|
||||||
return $this->getContacts('customer');
|
return $this->getContacts($this->getCustomerTypes());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getVendors()
|
public function getVendors()
|
||||||
{
|
{
|
||||||
return $this->getContacts('vendor');
|
return $this->getContacts($this->getVendorTypes());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getContacts($type)
|
public function getContacts($types)
|
||||||
{
|
{
|
||||||
return Contact::$type()->orderBy('name')->pluck('name', 'id')->toArray();
|
return Contact::type($types)->orderBy('name')->pluck('name', 'id')->toArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function applyDateFilter($event)
|
public function applyDateFilter($event)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user