From 3cf475c6984adc8d834ed798de1c952fb5836039 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Duli=C3=A7i?= Date: Sun, 27 Jun 2021 12:18:05 +0300 Subject: [PATCH] owner relationship for company --- app/Models/Common/Company.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Models/Common/Company.php b/app/Models/Common/Company.php index 8a5662f1b..c983a9b2e 100644 --- a/app/Models/Common/Company.php +++ b/app/Models/Common/Company.php @@ -217,6 +217,11 @@ class Company extends Eloquent implements Ownable return $this->hasMany('App\Models\Module\ModuleHistory'); } + public function owner() + { + return $this->belongsTo('App\Models\Auth\User', 'id', 'created_by'); + } + public function reconciliations() { return $this->hasMany('App\Models\Banking\Reconciliation');