3 months ago

Detect API request in laravel

Posted 3 months ago by duTchman1990

Hello, I'm working in a application where I'm using same API for desktop and android app in order to reuse the code. For an example There is an create user form in desktop website as well as in the app. So I have written one API to submit the form data, which is working perfectly. But my main requirement is to get the origin request for that form submit/post API. I have tried

jenssegers/agent package

, so far I am able to detect weather its mobile or desktop. Is there any other way to detect that the post request coming from the app end?

An extra parameter will do the job for sure, but I would like to avoid it. Any help is appreciated.

Please sign in or create an account to participate in this conversation.