How to get All input of POST in Laravel

后端 未结 8 890
不知归路
不知归路 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 17:38

    You can use it

    $params = request()->all();
    

    without

    import Illuminate\Http\Request OR

    use Illuminate\Support\Facades\Request OR other.

提交回复
热议问题