mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/unity.git
synced 2026-08-19 12:24:01 +00:00
hide id
This commit is contained in:
@@ -11,7 +11,16 @@ class EntitySignature extends Model
|
||||
{
|
||||
protected $table = 'entity_signatures';
|
||||
|
||||
protected $appends = ['hash_id', 'entity_list'];
|
||||
protected $appends = [
|
||||
'hash_id',
|
||||
'entity_hash_id',
|
||||
'entity_list'
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'id',
|
||||
'entity_id',
|
||||
];
|
||||
|
||||
public function entity()
|
||||
{
|
||||
@@ -23,6 +32,11 @@ class EntitySignature extends Model
|
||||
return Hasher::encode('entity_signatures', $this->id);
|
||||
}
|
||||
|
||||
public function getEntityHashIdAttribute()
|
||||
{
|
||||
return Hasher::encode('entities', $this->entity_id);
|
||||
}
|
||||
|
||||
public function getEntityListAttribute()
|
||||
{
|
||||
return $this->entity()->get()->makeHidden(['entity_signature_list']);
|
||||
|
||||
Reference in New Issue
Block a user