mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/unity.git
synced 2026-08-19 04:13:58 +00:00
hide id
This commit is contained in:
@@ -11,7 +11,16 @@ class ContractTemplate extends Model
|
||||
{
|
||||
protected $table = 'contract_templates';
|
||||
|
||||
protected $appends = ['hash_id', 'contract_template_obligation_list'];
|
||||
protected $appends = [
|
||||
'hash_id',
|
||||
'user_hash_id',
|
||||
'contract_template_obligation_list'
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'id',
|
||||
'user_id',
|
||||
];
|
||||
|
||||
public function contract_template_obligation()
|
||||
{
|
||||
@@ -23,6 +32,11 @@ class ContractTemplate extends Model
|
||||
return Hasher::encode('contract_templates', $this->id);
|
||||
}
|
||||
|
||||
public function getUserHashIdAttribute()
|
||||
{
|
||||
return Hasher::encode('users', $this->user_id);
|
||||
}
|
||||
|
||||
public function getContractTemplateObligationListAttribute()
|
||||
{
|
||||
return $this->contract_template_obligation()
|
||||
|
||||
Reference in New Issue
Block a user