Answer the question
In order to leave comments, you need to log in
How to add a parameter to a filter in actionAdmin in yii1?
I want the search to be filtered by the get parameter, I tried it, it didn’t work (I change the id in the line , all the records come out.
public function actionIndex($id)
{
$model = new Livings('search');
$model->order_id = $id;
$model->search();
$model->unsetAttributes();
if(isset($_GET['Livings']))
$model->attributes=$_GET['Livings'];
$this->render('admin',
[
'model'=>$model,
]);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question