为什么来自 POSTMAN 的 POST 请求返回空?

2022-01-22 00:00:00 post postman php laravel lumen

我在邮递员中的标题是这样的:

My header in the postman like this :

我的身体是这样的:

在 laravel lumen 的路线中,我这样检查:

In the routes laravel lumen, I check like this :

$router->group(['middleware' => 'auth'], function ($router) {
    ...
    $router->post('/sales-order', function (IlluminateHttpRequest $request)
    {
        echo '<pre>';print_r($request->all());echo '</pre>';die();
    });
});

邮递员返回空数组的结果如下:

The result in the postman return empty array like this :

我该如何解决这个错误?

How can I solve the error?

推荐答案

老兄!我终于意识到你的参数是错误的

DUDE! I finally realize your parameters is wrong

"number": ""123"" 你放2个双引号应该是"number": "123"

"number": ""123"" you put 2 double quote it should "number": "123"

相关文章