0
如何刪除laravel 5.2中的特定請求輸入。刷新頁面時,它發送相同的請求,並相應地在數據庫上執行相同的操作。刪除部分請求
如何刪除laravel 5.2中的特定請求輸入。刷新頁面時,它發送相同的請求,並相應地在數據庫上執行相同的操作。刪除部分請求
使用此語法在控制器的方法,你將不得不請求對象
class TestController extends Controller{
public function yourMethodName(Request $request){
$data=$request->except('fieldwhichyoudontwant1','fieldwhichyoudontwant2');//mention the fields you dont want
OR
$data=$request->only('fieldwhichyouwant1','fieldwhichyouwant2');//mention the fields you want only
}
}