How to get All input of POST in Laravel

后端 未结 8 895
不知归路
不知归路 2021-02-03 17:10

I am using Laravel 5 and trying to get all input of POST variable in controller like this-

public function add_question()
{
    return Request::all();
}
<         


        
8条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-03 18:01

    You can get all post data into this function :-

    $postData = $request->post();
    

    and if you want specific filed then use it :-

    $request->post('current-password');
    

提交回复
热议问题