mirror of
https://github.com/getformwork/formwork.git
synced 2025-03-14 19:19:48 +01:00
Add AdminTrait::redirectToPanel()
method
This commit is contained in:
parent
5a040536b8
commit
9beec6c66c
@ -39,6 +39,11 @@ trait AdminTrait
|
||||
Header::redirect($this->siteUri(), $code, $exit);
|
||||
}
|
||||
|
||||
public function redirectToPanel($code = 302, $exit = false)
|
||||
{
|
||||
$this->redirect('/', $code, $exit);
|
||||
}
|
||||
|
||||
public function redirectToReferer($code = 302, $exit = false, $default = null)
|
||||
{
|
||||
Header::redirect(HTTPRequest::referer() ?: $this->uri($default ?: '/'), $code, $exit);
|
||||
|
Loading…
x
Reference in New Issue
Block a user