Merge branch 'master' of itcorp.primaya.id:rajif/aso
This commit is contained in:
@@ -20,13 +20,35 @@ class Organization extends Model
|
||||
'main_address_id',
|
||||
];
|
||||
|
||||
public $with = [
|
||||
'metas'
|
||||
];
|
||||
// public $with = [
|
||||
// 'metas'
|
||||
// ];
|
||||
|
||||
public $appends = [
|
||||
'meta'
|
||||
];
|
||||
// public $appends = [
|
||||
// 'meta'
|
||||
// ];
|
||||
|
||||
/**
|
||||
* Scope a query to only include active data.
|
||||
*
|
||||
* @param \Illuminate\Database\Eloquent\Builder $query
|
||||
* @return void
|
||||
*/
|
||||
public function scopeActive($query)
|
||||
{
|
||||
$query->where('status', 'active');
|
||||
}
|
||||
|
||||
/**
|
||||
* Scope a query to only include hospital data.
|
||||
*
|
||||
* @param \Illuminate\Database\Eloquent\Builder $query
|
||||
* @return void
|
||||
*/
|
||||
public function scopeHospital($query)
|
||||
{
|
||||
$query->where('organizations.type', 'hospital');
|
||||
}
|
||||
|
||||
public function setCodeAttribute($value)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user