update: add company relationship with company module.

This commit is contained in:
weichien00
2021-07-12 16:51:43 +08:00
parent ab5202d8bb
commit bbfd905e5d
+9
View File
@@ -1,6 +1,7 @@
<?php
namespace App\Models;
use App\Classes\General\Interfaces\Documentable;
use App\Classes\General\Interfaces\Contactable;
use App\Classes\Modules\ServiceTypes\DataTransferObjects\ServiceConfigurationsObject;
@@ -42,6 +43,14 @@ class Company extends AbstractModel implements Documentable, Contactable
return $this->morphMany(Address::class, 'owner');
}
/**
* @return belongsToMany
*/
public function companyModule(): hasMany
{
return $this->hasMany(CompanyModule::class);
}
/**
* @return belongsToMany
*/