public function getToolregis() { // เชื่อมจาก registool ไปหา tool return $this->hasMany(Tools::className(), ['registool_id' => 'id']); }
public function getTooltooltype() { return $this->hasMany(Tools::className(), ['tooltype_id' => 'id']); }
public function getTooldep() { // เชื่อมจาก departments ไปหา tools return $this->hasMany(Tools::className(), ['department_id' => 'id']); }
/** * @return \yii\db\ActiveQuery */ public function getTools() { return $this->hasOne(Tools::className(), ['id' => 'tools_id']); }