From 1377fbb89aced067ca4762dec50a2f635e288a3d Mon Sep 17 00:00:00 2001 From: b1ek Date: Thu, 28 Nov 2024 02:37:32 +1000 Subject: [PATCH] fix: typo --- models/Subscription.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/models/Subscription.php b/models/Subscription.php index a230dc2..ac5bf04 100644 --- a/models/Subscription.php +++ b/models/Subscription.php @@ -5,7 +5,7 @@ namespace app\models; class Subscription extends \yii\db\ActiveRecord { public $user_id; - public $company_id; + public $blog_id; /** * {@inheritDoc} @@ -13,7 +13,7 @@ class Subscription extends \yii\db\ActiveRecord public function rules() { return [ - [['user_id'], 'required'], + [['user_id', 'blog_id'], 'required'], [['id'], 'integer'], ]; } @@ -23,9 +23,9 @@ class Subscription extends \yii\db\ActiveRecord return $this->hasOne(User::class, [ 'id' => 'user_id' ]); } - public function getCompany() + public function getBlog() { - return $this->hasOne(Company::class, [ 'id' => 'company_id' ]); + return $this->hasOne(Company::class, [ 'id' => 'blog_id' ]); } /**