So basically I want the following in routes web and api which actually go to the same controller but base on whether it's from web or api then it will either return html or json.
So inside this controller is there a way to know which routes the request is from?