From 4e84bea5e8848a5e6e26619dc67342a94e91a943 Mon Sep 17 00:00:00 2001 From: liapples Date: Wed, 18 Aug 2021 17:29:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0agentProduct=E5=85=B3?= =?UTF-8?q?=E8=81=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Models/Agent.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Models/Agent.php b/app/Models/Agent.php index c201860..979e2a1 100644 --- a/app/Models/Agent.php +++ b/app/Models/Agent.php @@ -43,4 +43,9 @@ class Agent extends BaseModel $this->attributes['password'] = password_hash($value, PASSWORD_BCRYPT); } } + + public function agentProduct() + { + return $this->hasMany(AgentProduct::class); + } }