I have an error when upgrading laravel 6
Symfony \\ Component \\ Debug \\ Exception \\ FatalThrowableError (E_ERROR) Class \'Illuminate\\Support\\F
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
use Input;
add to the top of your class.
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
In config/app.php
, replace:
'Input' => Illuminate\Support\Facades\Input::class
with
'Input' => Illuminate\Support\Facades\Request::class,
use Illuminate\Support\Facades\Request;
Request::input();