The parameter transfer under the same domain name is easy to implement, but there are some limitations in Cross-domain domain. Of course, I can search a lot of introduction posts, here I jsonp this one-way cross-domain way to summarize, and attach a small example.
Problem Description:
Because of the development on the server, use the unused port number to distinguish between different projects.
Implementation 192.168.1.10:8888 can invoke parameters on the 8889 project. (Originating from single sign-on, required for verification)
192.168.1.10:8888 End:
1. Controller implementation:
Public function test ()
{return
view (' Test ');
}
2. ' test.blade.php ':
192.168.1.10:8889 End:
1.controller implementation:
Public function test ()
{
\debugbar::d isable ();
$callback = Input::get (' callback ');
$arr =array (' A ' => ' Panhe ', ' B ' => ' Dada ');
return $callback. " ('". Json_encode ($arr). "')";
return response ($callback.) ('". Json_encode ($arr). "')")->withcookie (' Test ', ' authverify ', 10000000, '/')
->header (' P3P ', ' cp= ') IDC DSP COR ADM DEVi taii PSA PSD Ivai Ivdi CONi His our IND CNT "');
}