list dokter, list RS

This commit is contained in:
pajri
2022-12-15 17:10:25 +07:00
parent 1baaf80b2b
commit 1857653ce0
14 changed files with 17506 additions and 116 deletions

View File

@@ -27,7 +27,17 @@ class Address extends Model
'period_start',
'period_end',
];
protected $hidden = [
'created_at',
'updated_at',
'deleted_at',
'created_by',
'updated_by',
'deleted_by',
];
public function addressable()
{
return $this->morphTo();

View File

@@ -24,9 +24,18 @@ class Organization extends Model
// 'metas'
// ];
// public $appends = [
// 'meta'
// ];
public $appends = [
'meta'
];
protected $hidden = [
'created_at',
'updated_at',
'deleted_at',
'created_by',
'updated_by',
'deleted_by',
];
/**
* Scope a query to only include active data.

View File

@@ -19,6 +19,21 @@ class PractitionerRole extends Model
'active',
];
public $appends = [
'meta'
];
public function getMetaAttribute()
{
$orgMeta = [];
foreach ($this->metas as $meta) {
$orgMeta[$meta->type] = $meta->value;
}
return (object) $orgMeta;
}
/**
* Scope a query to only include active data.
*