From 3d4a0f43644eeade4c7c0eafd42c32d4068cd0c2 Mon Sep 17 00:00:00 2001 From: Dedan Date: Thu, 5 Sep 2024 18:48:45 +0300 Subject: [PATCH] Changes to files: app/Models/Blacklist.php app/Models/Whitelist.php --- app/Models/Blacklist.php | 10 ++++++++++ app/Models/Whitelist.php | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/app/Models/Blacklist.php b/app/Models/Blacklist.php index bd2621d..bc49108 100755 --- a/app/Models/Blacklist.php +++ b/app/Models/Blacklist.php @@ -3,6 +3,7 @@ namespace Modules\Mail\Models; use Modules\Base\Models\BaseModel; +use Modules\Mail\Models\Contact; class Blacklist extends BaseModel { @@ -20,4 +21,13 @@ class Blacklist extends BaseModel */ protected $table = "mail_blacklist"; + /** + * Add relationship to Contact + * @return \Illuminate\Database\Eloquent\Relations\BelongsTo + */ + public function contact() + { + return $this->belongsTo(Contact::class); + } + } diff --git a/app/Models/Whitelist.php b/app/Models/Whitelist.php index 534145c..82692c1 100755 --- a/app/Models/Whitelist.php +++ b/app/Models/Whitelist.php @@ -3,6 +3,7 @@ namespace Modules\Mail\Models; use Modules\Base\Models\BaseModel; +use Modules\Mail\Models\Contact; class Whitelist extends BaseModel { @@ -20,4 +21,13 @@ class Whitelist extends BaseModel */ protected $table = "mail_whitelist"; + /** + * Add relationship to Contact + * @return \Illuminate\Database\Eloquent\Relations\BelongsTo + */ + public function contact() + { + return $this->belongsTo(Contact::class); + } + }