Redirect / Forward

Hello to all,

Im new to Phalconphp, im coming from kohana and laravel frameworks. Im working on a project with phalcon about one week and I'm enjoying it a lot !

One question , $this->response->redirect('controller/action'); or $this->dispatcher->forward() ??

thx

Hi @kadinho

redirect will do an http redirection (with the header location). It means that the browser of the client will change the page. It processes to a new routing (it can also be used to go to another website) and the actual script will end.

forward is internal, the browser of the client wont see any difference, you just execute a different controller.

I hope that's clear enough.



8.0k

Hi

the doubt was in forward but now is clear ! Thank you :)

regards

Just done a schema to be more clear : http://imgur.com/bvJhdEQ



8.0k

cant open ...