redirect()
Thanks to:
No one :(
Description
Redirects you to a specified controllers action. Unless stated otherwise, it will use the controller in the current context.
Usage: redirect(string|array $url, integer $status) return $this->redirect(['controller' => 'Users', 'action' => 'login']) return $this->redirect(['action' => 'index']); CC// Can also be used to load a file, redirect to a different website and send an optional status codeCC return $this->redirect('/orders/confirm'); return $this->redirect('/orders/confirm', 301); return $this->redirect('http://www.example.com');