Hi guys.
I am totally stuck with this. I dont understand and cant see why route is hits twice.
I try to connect passport to user object depends on what he is logged in or not. In this case i just cleared up for case where user is logged in and he tries to add passport. Problem is that when i hit my route it calls it like twice which means log looks like this
[2015-03-22 11:24:45] local.INFO: I hitted connect method
[2015-03-22 11:24:45] local.INFO: I created passport!
[2015-03-22 11:24:45] local.INFO: i returned true
[2015-03-22 11:24:45] local.INFO: I hitted connect method
[2015-03-22 11:24:45] local.INFO: passport object exists
[2015-03-22 11:24:45] local.INFO: and i returned true
Problem is that first time i hit it is on 'how?' which means there are 2 requests and $_SERVER in log are the same.
When i am on 'how?' dd() i delete record from database and hit route again and everything works fine.
I go to home page, delete record and hit route and i get 'how?' again.
@bashy Yes. via browser. i logged in this things. It gives the second request when i try to hit route from home page. When i break request somewhere (getting first dd('how?')) delete record and hit route again, everything works fine.
Go to homepage, delete record, hit route - i got 'how?' and when i log entry points route is called twice.
Even in this dd() functions actions like creating passport works but somehow dd does not stop them and second request go at the same time.
I took off https as well, moved everything to controller. Thing is it doesn`t matter. via xdebug it seems like it boots up application twice. Sometimes it does work, but it acts super weird. Hints?