public static previous ( string $name = null ) : string | null | ||
$name | string | the named associated with the URL that was remembered previously. If not set, it will use [[\yii\web\User::returnUrlParam]]. |
Résultat | string | null | the URL previously remembered. Null is returned if no URL was remembered with the given name. |
public static function previous($name = null)
{
if ($name === null) {
return Yii::$app->getUser()->getReturnUrl();
} else {
return Yii::$app->getSession()->get($name);
}
}
public static function previous($name = null) { if ($name === null) { return self::getLastUrl(); } return parent::previous($name); }