0
我有一個請求Laravel當我上載與關鍵「SIUP」文件,這樣顯示的請求數據的問題:Laravel請求文件更改
"_token" => "Ab9zfuQn0rb0exCx7IdMcnAxQWi4iqWcfcDy319B"
"_method" => "PUT"
"first_name" => "first"
"last_name" => "aaa"
"email" => "[email protected]"
"province" => "11"
"city_id" => "38"
"address" => "asdasd"
"phone" => "1234567890"
"company_type" => "koperasi"
"company_name" => "qqq"
"company_address" => "qqq"
"pic" => "qqqa"
"position" => "qqq"
"siup" => UploadedFile {#30 ▶}
我想這樣做的請求響應
$request->merge(['siup'=>$myVar]);
但關鍵siup沒有改變。我想通過laravel雄辯的更新來更改siup值以將其插入到數據庫中。
,所以我不能在我的請求變量刪除SIUP關鍵? – yudijohn
@patricus謝謝!我花了幾個小時試圖弄清楚爲什麼我的上傳文件替換不起作用,現在我用$ request-> files-> replace(array('file1' - > file1 )),但它的工作原理! (在我的情況下,它是每次上傳單個文件) – adaba
不知何故$ this-> validate($ request,$ rules)對文件部分再次有一個未變更的$請求... – adaba