mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 15:12:48 +08:00
增加Redirect restore、restore返回值
This commit is contained in:
@@ -78,14 +78,17 @@ class Redirect extends Response
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 记住当前url后跳转
|
* 记住当前url后跳转
|
||||||
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function remember()
|
public function restore()
|
||||||
{
|
{
|
||||||
Session::set('redirect_url', Request::instance()->url());
|
Session::set('redirect_url', Request::instance()->url());
|
||||||
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 跳转到上次记住的url
|
* 跳转到上次记住的url
|
||||||
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function restore()
|
public function restore()
|
||||||
{
|
{
|
||||||
@@ -93,5 +96,6 @@ class Redirect extends Response
|
|||||||
$this->data = Session::get('redirect_url');
|
$this->data = Session::get('redirect_url');
|
||||||
Session::delete('redirect_url');
|
Session::delete('redirect_url');
|
||||||
}
|
}
|
||||||
|
return $this;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user