laravel 5 : Class 'input' not found

前端 未结 14 1014
滥情空心
滥情空心 2020-12-02 07:35

In my routes.php file I have :

Route::get(\'/\', function () {

    return view(\'login\');
});

Route::get(\'/index\', function(){
    return v         


        
14条回答
  •  我在风中等你
    2020-12-02 07:52

    In larvel => 6 Version:

    Input no longer exists In larvel 6,7,8 Version. Use Request instead of Input.

    Based on the Laravel docs, since version 6.x Input has been removed.

    The Input Facade

    Likelihood Of Impact: Medium

    The Input facade, which was primarily a duplicate of the Request facade, has been removed. If you are using the Input::get method, you should now call the Request::input method. All other calls to the Input facade may simply be updated to use the Request facade.

    use Illuminate\Support\Facades\Request;
    ..
    ..
    ..
     public function functionName(Request $request)
        {
            $searchInput = $request->q;
    }
    

提交回复
热议问题