There is a Laravel's rector package for this: click here
Also there's an guide on the same here: Automating Code Refactoring in Laravel with Rector
If you want to do it yourself manually, follow this guide here!
Check this link If could be of help in version upgrade.
https://laravel.com/docs/12.x/upgrade
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.