全新安装的L4:
Route.php
Route::post('/test', 'TestController@store');
Run Code Online (Sandbox Code Playgroud)
TestController.php
class TestController extends Controller {
/**
* Store a newly created resource in storage.
*
* @return Response
*/
public function store()
{
print_r(Input::get());
//
}
}
Run Code Online (Sandbox Code Playgroud)
卷曲URL
curl --data "param1=value1¶m2=value2" http://example.com/test
Run Code Online (Sandbox Code Playgroud)
输出:
Array
(
[param1] => value1
[param2] => value2
[/test] =>
)
Run Code Online (Sandbox Code Playgroud)
这里的请求URI是什么?
PS:使用Nginx/Php-fpm堆栈应该重要.
原来是我正在使用的ngixn干净URL片段.改为:
if (!-d $request_filename)
{
rewrite ^/(.*)$ /index.php?/$1 last;
}
Run Code Online (Sandbox Code Playgroud)
至:
try_files $uri $uri/ /index.php?$args;
Run Code Online (Sandbox Code Playgroud)
它在上次更新之前工作正常.
归档时间: |
|
查看次数: |
3152 次 |
最近记录: |