问题
I am working on a project which is in Laravel 5.8, and recently, I upgraded it to Laravel 6.0 with its packages dependencies versions too. The project was running fine. But, today, I update the composer via composer update,
and it upgraded to Laravel 6.2. After that, I faced an error:
App\Http\Controllers\Auth\ConfirmPasswordController does not exist
Then I installed a fresh Laravel-6.2
and generated basic scaffolding via php artisan ui vue,
then, generated login/registration
scaffolding via php artisan ui vue --auth.
After that, I found ConfirmPasswordController.
Then, I manually created ConfirmPasswordController
in my running project and copied all of the codes from ConfirmPasswordController
to my manually created ConfirmPasswordController.
Then, the error has gone. Although I did not face any error related to this. But, I am confused about my approach. Is it right way what I did? Or it has a better way to solve this problem. I am confused about, If I face many issues for php artisan ui vue --auth
in the next time. Would someone suggest me the right process, what should I do?
回答1:
From v6.0.0 to v6.2.0 the following addition and modifications were made.
A app/Http/Controllers/Auth/ConfirmPasswordController.php
M app/Http/Controllers/Auth/ForgotPasswordController.php
M app/Http/Controllers/Auth/ResetPasswordController.php
M app/Http/Kernel.php
M config/auth.php
M resources/lang/en/validation.php
Make sure these changes are in your Laravel instance though it sounds like they now are. You can see the diff of v6.0.0 to v6.2.0 here. If you need to see v5.8.0 changes through 6.2.0, please go here.
回答2:
When upgrading, you will need to copy it from https://github.com/laravel/laravel/blob/master/app/Http/Controllers/Auth/ConfirmPasswordController.php
This is known, reference https://github.com/laravel/ui/pull/36#issuecomment-539921924.
来源:https://stackoverflow.com/questions/58310002/confirmpasswordcontroller-doesnt-exist-after-upgrade-from-laravel-5-8-to-6-2