[WIP] ASO Payment
This commit is contained in:
@@ -17,6 +17,15 @@ class CorporateService extends Model
|
||||
'status',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
'deleted_at',
|
||||
'created_by',
|
||||
'updated_by',
|
||||
'deleted_by',
|
||||
];
|
||||
|
||||
public function corporate()
|
||||
{
|
||||
return $this->belongsTo(Corporate::class);
|
||||
@@ -33,10 +42,20 @@ class CorporateService extends Model
|
||||
}
|
||||
|
||||
public function specialities()
|
||||
{
|
||||
return $this->belongsToMany(Speciality::class, 'corporate_service_specialities', 'corporate_service_id', 'speciality_id', 'id', 'id')
|
||||
->withPivot(['active']);
|
||||
}
|
||||
|
||||
public function corporateServiceSpecialities()
|
||||
{
|
||||
return $this->hasMany(CorporateServiceSpeciality::class, 'corporate_service_id');
|
||||
}
|
||||
|
||||
public function scopeActive($query) {
|
||||
$query->where('status', 'active');
|
||||
}
|
||||
|
||||
public function scopeFilter($query, array $filters)
|
||||
{
|
||||
if (!empty($filters['search'])) {
|
||||
|
||||
Reference in New Issue
Block a user