I have problem with slim
I have the controllar, and 2 routs send to this controller.
- The page html with teig.
- The api and show that in json.
Now I need to check, if I request with this url:
/product/{slug}
return the twig (I do the return).
and if I request to url:api/product/{slug}
return me the json (i do the return).
now I don't know how to the the if request. and how I just to know check what url request that controller.