You can use HTTP Headers and use HTTP_REFERER header to verify that.
In your controller you can use this code to fetch the referer header
request()->headers->get('referer')
and this will return you the url where the user came from.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
How to check request is from same domain in laravel . if request is from same website domain then user enter in website..
otherwise user would not enter website or not able to hit the multiple request and database .
this i am doing for security
thanks
Please or to participate in this conversation.