我可以看到当我转储($ request-> request)
时填充参数ParameterBag {#69 ▼
#parameters: array:1 [▼
"form" => array:8 [▼
"phone" => "2042333233"
"price" => "72"
"region" => "1"
"accept_terms" => "1"
"_token" => "XXX"
]
]
}
但是当我尝试访问参数时:
$request->get('phone')
$request->request->get('phone')
请求是从POST填充的 - 所以后者应该可以工作,但结果是NULL ???
答案 0 :(得分:0)
试试这个:
$request->request->get('form')['phone']