Let's say I have a controller template with a before function like so...
public function before()
{
parent::before();
if ($this->request === Request::instance())
{
// its a main request, throw an exception or redirect
Request::instance()->redirect('/');
}
else
{
// ok
}
}
But let's say I don't want to redirect, I want to stop the Request flow, and do nothing.
Does an exception do this? Is there a simple way, like Request::die();
?
EDIT:: I actually don't want to halt the Request flow, just prevent this controller from doing anything. It's likely that this controller was called from another controller, and I want to pass the control back to the calling controller.'
Thanks!