Hello!
I'm writing a custom component, but as part of it under certain conditions I need to be able to force a redirect. I'd seen the documentation here about the component/page lifecycle:
https://octobercms.com/docs/plugin/components#page-cycle-handlers
and got the impression I should be able to :
return \Redirect::to('/my-url/');
within the onRun() method of the component, but it seems to have no effect - the page just loads as normal even when just doing:
public function onRun() { return \Redirect::to('/my-url/'); }
i've also tried it in the init() function too, to no avail. Any idea what i'm missing?
Cheers, Rick.