Hi All,
I’m quite new to Yii and I’m facing a little problem,
I would like to display a table already filtered adn allow the filter with query parameters string.
I declare a new action in Controller
public function actionIndexFiltered($candidateId)
{
$searchModel = new CvRisorsaTitoloSearch();
//$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
$dataProvider = $searchModel->search(
[$searchModel->formName() => ['is_cod_candidato' => $candidateId]]
);
return $this->render('index', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
]);
}
This code works but it doesen’t allow filter with query paramters.
‘CvRisorsaTitolo’ is a “many to many” table with other information,
and ‘is_cod_candidato’ is a field of ‘CvRisorsaTitolo’.
Hiow can I combine my filter and filter of query parameters ion other fileds "Yii::$app->request->queryParams".
Can anyone help me?