Add Service Config

This commit is contained in:
2022-08-08 12:51:32 +07:00
parent da739af519
commit 3b63f02bc4
17 changed files with 1171 additions and 3 deletions

View File

@@ -67,4 +67,14 @@ class Corporate extends Model
{
return $this->morphMany(ImportLog::class, 'importable');
}
public function services()
{
return $this->hasManyThrough(CorporateService::class, Service::class, 'corporate_id', 'service_code', 'id', 'service_code');
}
public function corporateServices()
{
return $this->hasMany(CorporateService::class, 'corporate_id');
}
}