hasOne(User::class, [ 'id' => 'user_id' ]); } public function getBlog() { return $this->hasOne(Company::class, [ 'id' => 'blog_id' ]); } /** * {@inheritDoc} */ public function tableName() { return "subscriptions"; } }