Class 'Illuminate\Support\Facades\Input' not found

前端 未结 11 1766
生来不讨喜
生来不讨喜 2021-01-12 05:14

I have an error when upgrading laravel 6

Symfony \\ Component \\ Debug \\ Exception \\ FatalThrowableError (E_ERROR) Class \'Illuminate\\Support\\F

相关标签:
11条回答
  • 2021-01-12 05:53

    Input no longer exists. Either use the Request facade or alias that instead of Input. Kindly read this upgrade guide in Laravel 6 for more details. https://laravel.com/docs/6.x/upgrade#the-input-facade

    0 讨论(0)
  • 2021-01-12 05:55

    use Input; add to the top of your class.

    0 讨论(0)
  • 2021-01-12 05:55

    The very best way to fix this is to copy the Input.php file which laravel provided here and paste the file in your project directory.

    Don't forget to add this to your controller use Illuminate\Http\Request;

    laravelproject\vendor\laravel\framework\src\Illuminate\Support\Facades

    0 讨论(0)
  • 2021-01-12 06:03

    In config/app.php, replace:

    'Input' => Illuminate\Support\Facades\Input::class
    

    with

    'Input' => Illuminate\Support\Facades\Request::class,
    
    0 讨论(0)
  • 2021-01-12 06:05
    use Illuminate\Support\Facades\Request;
    
    Request::input();
    
    0 讨论(0)
提交回复
热议问题