5

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

Shrinath
  • 7,888
  • 13
  • 48
  • 85
Vivek Goel
  • 22,942
  • 29
  • 114
  • 186

1 Answers1

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);
Community
  • 1
  • 1
alex
  • 479,566
  • 201
  • 878
  • 984
  • 1
    There is no `Request::instance()` in Ko3.1, use `Request::current()` or `Request::initial()` instead (redirect can be done from any Request object). – biakaveron Apr 14 '11 at 06:48