yii2-relation-trait
yii2-relation-trait copied to clipboard
Error : Too few arguments to function app\models\base\Penilaian::getPenilaianDetsWithParam(), 0 passed and exactly 1 expected
I have created a manual method for filtering relation data. But relation trait not supported this method with a parameter or how to send the parameter to this new method? Thank you.
public function getPenilaianDetsWithParam($kinerjaId)
{
return $this->hasMany(\app\models\PenilaianDet::className(), ['penilaian_id' => 'id'])->where('kinerja_id = :kinerjaId', [':kinerjaId' => $kinerjaId])
->orderBy('kinerja_id');
}