What is the correct way on PHP, Phalcon Framework on how to optionally escape a forward slash "/" that has optional parameter at the end.
I want to achieve:
http://example.com/transactions
http://example.com/transactions/
http://example.com/transactions/1
http://example.com/transactions/2
My regex:
Working, but without params :(
transactions[/]{0,1}
Not working, on server logs, it's adding "transactions/2" even if the url does not have it.
transactions[/]{0,1}{param}
Working, but explicitly instruct to have a param at the end. How can I have an optional "/" forward slash.
transactions/{param}
Appreciate any advise.
Thanks