get custom field by slug in models

This commit is contained in:
harshjagad20
2021-05-22 13:52:30 +05:30
parent 5ccc9eba4c
commit 83234cfac3
4 changed files with 20 additions and 0 deletions

View File

@ -510,4 +510,9 @@ class Estimate extends Model implements HasMedia
'{ESTIMATE_LINK}' => url('/customer/estimates/pdf/'.$this->unique_hash),
];
}
public function getValues($slug)
{
return $this->getCustomFieldValues($slug);
}
}

View File

@ -219,4 +219,9 @@ class Expense extends Model implements HasMedia
return true;
}
public function getValues($slug)
{
return $this->getCustomFieldValues($slug);
}
}

View File

@ -446,4 +446,9 @@ class Payment extends Model implements HasMedia
'{PAYMENT_LINK}' => $this->paymentPdfUrl,
];
}
public function getValues($slug)
{
return $this->getCustomFieldValues($slug);
}
}

View File

@ -422,4 +422,9 @@ class User extends Authenticatable implements HasMedia
return $companySettings;
}
public function getValues($slug)
{
return $this->getCustomFieldValues($slug);
}
}