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