php - Slim Routing - Routes ignored -


I have a problem how to model my routes so that they are correctly identified, I have the following routes:

  $ app-> Receive (use '/ course /: id', function ($ id) ($ app) {$ app-> 200, array ("id parameter"))}); $ App- & gt; Receive (use '/ course / present', function () ($ app) {$ app- & gt; render (200, array ("affiliate parameter"))}); $ App- & gt; Receive (use '/ course / search', function () ($ app) {$ app- & gt; render (200, array ("search parameter"))}); If I call URI Localhost / Course / 12 then I will get the expected result "ID parameter", but if I call URI localhost / course / search or localhost / course / attendants I still get the same result. 

Looks like I'm missing something here ...


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -