Php 无法使用json检索laravel post数据

Php 无法使用json检索laravel post数据,php,json,laravel,Php,Json,Laravel,我无法使用fiddler检索json post数据 POST http://localhost/backend/login HTTP/1.1 User-Agent: Fiddler Host: 192.168.0.147 content-type: application/json Content-Length: 278 { 'name': 'Phill Sparks', 'location': 'England', 'skills': [ 'PHP',

我无法使用fiddler检索json post数据

POST http://localhost/backend/login HTTP/1.1
User-Agent: Fiddler
Host: 192.168.0.147
content-type: application/json
Content-Length: 278

{
    'name': 'Phill Sparks',
    'location': 'England',
    'skills': [
        'PHP',
        'MySQL',
        'Laravel'
    ],
    'jobs': [
        {
            'org': 'Laravel',
            'role': 'Quality Team',
            'since': 2012
        }
    ]
}
路线:

Route::post('backend/login', 'UserController@backendLogin');
控制器:

public function backendLogin()
{
//Input::all() and Input::json()->all() are empty
}

此处缺少任何内容?

您需要将单引号(
'England'
)替换为双引号(
'England'
),以获得有效的JSON负载。您需要对键和值都执行此操作