v2 first commit
This commit is contained in:
22
app/Traits/Contacts.php
Normal file
22
app/Traits/Contacts.php
Normal file
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Traits;
|
||||
|
||||
use App\Models\Common\Contact;
|
||||
|
||||
trait Contacts
|
||||
{
|
||||
public function getCustomerTypes($return = 'array')
|
||||
{
|
||||
$types = (string) setting('contact.type.customer', 'customer');
|
||||
|
||||
return ($return == 'array') ? explode(',', $types) : $types;
|
||||
}
|
||||
|
||||
public function getVendorTypes($return = 'array')
|
||||
{
|
||||
$types = (string) setting('contact.type.vendor', 'vendor');
|
||||
|
||||
return ($return == 'array') ? explode(',', $types) : $types;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user