191], [['org_id'], 'exist', 'skipOnError' => true, 'targetClass' => Organizations::className(), 'targetAttribute' => ['org_id' => 'id']], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'ID', 'org_id' => 'Org ID', 'first_name' => 'First Name', 'last_name' => 'Last Name', 'position' => 'Position', 'created_at' => 'Created At', 'updated_at' => 'Updated At', 'deleted_at' => 'Deleted At', ]; } /** * Gets query for [[Org]]. * * @return \yii\db\ActiveQuery|OrganizationsQuery */ public function getOrg() { return $this->hasOne(Organizations::class, ['id' => 'org_id'])->inverseOf('persons'); } /** * {@inheritdoc} * @return PersonsQuery the active query used by this AR class. */ public static function find() { return new PersonsQuery(get_called_class()); } }