Status change by clicking yes or no word in yii2 for all pagination

153 views Asked by At

In my data grid i have 2 pages . when i click on my function value to change this to net value then after refreshing it redriect me on my index page at pagination=>1. but i change pagination at=>2 .. My code of function is

'value' => function ($data)
            {
                if ($data->is_featured == "1")
                { 
                    $url = Yii::$app->params['application_base'].'backend/mentor/not_featured/'.$data->mentor_id;
                    $title = 'Click to remove featured attribute';
                    return Html::a('Yes',$url.$data->mentor_id,['title'=>$title],['data-id'=>$data->mentor_id]);

                } 
                else
                {
                    $url = Yii::$app->params['application_base'].'backend/mentor/featured/'.$data->mentor_id;
                    //print_r($url);
                    //exit;
                    $title = 'Click to make featured mentor';
                    return Html::a('No',$url,['title'=>$title],['data-id'=>$data->mentor_id]);
                }
            },
0

There are 0 answers