From bbfd905e5dd9933b412024f11dfbe83cb8d7f75e Mon Sep 17 00:00:00 2001 From: weichien00 Date: Mon, 12 Jul 2021 16:51:43 +0800 Subject: [PATCH] update: add company relationship with company module. --- app/Models/Company.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/Models/Company.php b/app/Models/Company.php index 4ef00640..bd137a4a 100644 --- a/app/Models/Company.php +++ b/app/Models/Company.php @@ -1,6 +1,7 @@ morphMany(Address::class, 'owner'); } + /** + * @return belongsToMany + */ + public function companyModule(): hasMany + { + return $this->hasMany(CompanyModule::class); + } + /** * @return belongsToMany */