How to Upgrade Laravel Application from Version 5 to latest Version 8

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 Ofofonobs from 5.8 to the latest 8 versions.

All you need to know before upgrading your old laravel.

  1. External packages might fail to install, so isolate your packages first
  2. Install fresh laravel application
  3. 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 bootstrap
php artisan ui vue
php artisan ui react

// Generate login / registration scaffolding...
php artisan ui bootstrap --auth
php artisan ui vue --auth
php 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.


Ikuesan Oluwaseun (CEO OFOFONOBS) is a Nigerian news carrier blogger, writer, entrepreneur and a web developer. We bring you the Nigerian News, Music and All Informative Messages On This Medium. Connect With Me Via: IG/Twitter: @ofofonobs Call/Whatsapp: +2348114313795

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Related Articles