Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call another controller #224

Open
willianis4w opened this issue Sep 16, 2016 · 1 comment
Open

Call another controller #224

willianis4w opened this issue Sep 16, 2016 · 1 comment

Comments

@willianis4w
Copy link

Hey guys!

Is it possible to call a controller from other controller?

Thank you, I really enjoy this project :)

@panique
Copy link
Owner

panique commented Sep 17, 2016

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 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants