public function hasOffer() { $result = $this->hasOne(SpecialOffer::className(), ['company_id' => 'id']); return $result->count() > 0; }