url::redirect in kohana 3.1
Asked Answered
D

1

5

I can't find function url::redirect in kohana 3.1
What is the new name for this function ? (If it still exists !)

Deficit answered 14/4, 2011 at 6:29 Comment(0)
S
11

It has been changed in Kohana 3 to...

$this->request->redirect($newUrl);

You can use that in a controller.

Otherwise, use (as biakaveron kindly pointed out)...

Request::current()->redirect($newUrl);
Spiritualize answered 14/4, 2011 at 6:36 Comment(1)
There is no Request::instance() in Ko3.1, use Request::current() or Request::initial() instead (redirect can be done from any Request object).Dwaynedweck

© 2022 - 2024 — McMap. All rights reserved.