panique/mini

Call another controller

Opened this issue · 1 comments

Hey guys!

Is it possible to call a controller from other controller?

Thank you, I really enjoy this project :)

That's a good question ! :) In normal frameworks you can do this for sure, but i would go with a helper like Helper::MyHelperMethod($abc) or do a hard redirect+exit.

http://php.net/manual/en/function.header.php

btw it's important to do the exit; after doing a redirect as technically a redirect is just "asking the browser" to go somewhere else, your php process will still go on !