Hyphen in Controller Function Names? |
[eluser]Prophet[/eluser]
Hi all, the project I am working on at the moment needs to have "pretty" URLs. An example that is giving me grief is "/reports/stock-take". The way I have gone about this is by creating a function called stock-take() in my reports controller... But of course PHP doesn't like hyphens in function names. How can I keep the hyphen in the URL and still call a separate stock_take() function?
[eluser]John_Betong[/eluser]
[quote author="Prophet" date="1271434847"]Hi all, the project I am working on at the moment needs to have "pretty" URLs. An example that is giving me grief is "/reports/stock-take". The way I have gone about this is by creating a function called stock-take() in my reports controller... But of course PHP doesn't like hyphens in function names. How can I keep the hyphen in the URL and still call a separate stock_take() function?[/quote] Take a look at ./config/routes.php
[eluser]Prophet[/eluser]
[quote author="John_Betong" date="1271436386"]Take a look at ./config/routes.php[/quote] Thank you very much!
[eluser]Aidy[/eluser]
I been using this, works brill.. http://ellislab.com/forums/viewthread/85901/#623512 |
Welcome Guest, Not a member yet? Register Sign In |