I need to check if user went to certain routes from my site or from other site and execute logic that depends on site user came from. I tried to do something like this
if( redirect()->back()->getTargetUrl() === '***') {
}
but it returns http://localhost:8080 instead of real site I went to localhost from