I want to save the last place that a user visited before he click onto \"Edit\" button in the gridview widget of a page. I created a variable named $lastAddress but I really don
Use use to pass in variables from the parent scope to a closure:
'update' => function ($url, $model) use ($lastAddress) {
$url .= '&lastAddress=' . $lastAddress; //This is where I want to append the $lastAddress variable.
return Html::a('', $url);
},