Hi, Folks, have you feels like Laravel continuous released of new versions has let you down and you can't cope with it any longer, don't worry this article is a quick guide for you, that has I upgrade naijacrawl from 5.8 to the latest 8 versions.
All you need to know before upgrading your old laravel.
- External packages might fail to install, so isolate your packages first
- Install fresh laravel application
- Thank me later.
First, all you will do to be successful when upgrading your laravel application is to have two projects, your old project and the new fresh laravel 8.
Slowly move all your web.php, app folder, resources, migrations, public folder to the new fresh laravel.
Secondly, copy your external packages from composer.json to the new laravel composer.json
Quickly run composer update, if any packages break, remove it and continue, then look for alternative packages that broken and quickly get your new laravel working on laravel 8.
Quick little changes that might affect you, the routing method, look at laravel doc to see the latest way for routing but in my case, everything works perfectly after moving the above-mentioned files and update my packages.
Again if your laravel app is using Auth, you have to install laravel auth via command line
composer require laravel/UI
Now you have to scaffold the auth running the below command
// Generate basic scaffolding...php artisan ui bootstrapphp artisan ui vuephp artisan ui react// Generate login / registration scaffolding...php artisan ui bootstrap --authphp artisan ui vue --authphp artisan ui react --auth
Note for an old project no need to run those commands because you have them already.
Hurray! You have made it to laravel the latest version.