/** * @return \yii\db\ActiveQuery */ public function getClient() { return $this->hasOne(Client::className(), ['client_id' => 'client_id']); }
/** * @return \yii\db\ActiveQuery */ public function getClients() { return $this->hasMany(Client::className(), ['client_id' => 'client_id'])->viaTable('route-client', ['route_id' => 'route_id']); }