How to upgrade Laravel Spark to version 3.*

laravel framework csrf

Why upgrade Spark?

Make backup of your /spark folder! Some of the files will be overwritten so you can lose your work!

Upgrading to Spark 3 brings new features and security fixes. You can check currently installed version by navigating to project’s main folder and running:



root@machine:/# php artisan spark:version
Laravel Spark version 3.0.4

Spark installed using Spark installer

If you already have required entries in the composer file you only need to run this command:



root@machine:/# php artisan spark:update

Updating Views: 
    ⇒ View [layouts/app.blade.php] has been modified. Skipping...
    ⇒ View [settings/teams/update-team-photo.blade.php] has been modified. Skipping...
    ⇒ View [settings/profile.blade.php] has been modified. Skipping...
    ⇒ View [settings/profile/update-profile-photo.blade.php] has been modified. Skipping...
    ⇒ View [nav/brand.blade.php] has been modified. Skipping...
    ⇒ View [auth/register-common-form.blade.php] has been modified. Skipping...
    ⇒ View [nav/support.blade.php] is new. Installing...
Updating Spark Directory: 
Removing Temporary Download Directory: 
You are now running on Spark v3.0.5. Enjoy!

Everything should work fine, if you have any troubles follow bellow instructions.

Spark installed manually

You need to have those entries in your composer file and then run composer update

    
    
    
    {
        "require": 
        {
            "laravel/framework": "5.3.*",
            "laravel/cashier": "~7.0",
            "laravel/spark": "*@dev",
            "laravel/spark-installer": "*@dev"
        }
    }

Then you need to register spark as global command by following this article

Next step is to register your Spark instance if you have not already:



root@machine:/# spark register JnwTgqCkl6FlrcdqGMHktvSynabdB3fsaA0sTEFeeSAza4F4H6SC4o8C
Validating Token: 
Thanks for registering Spark!

Then you can run the update command:



root@machine:/# php artisan spark:update

Updating Views: 
    ⇒ View [layouts/app.blade.php] has been modified. Skipping...
    ⇒ View [settings/teams/update-team-photo.blade.php] has been modified. Skipping...
    ⇒ View [settings/profile.blade.php] has been modified. Skipping...
    ⇒ View [settings/profile/update-profile-photo.blade.php] has been modified. Skipping...
    ⇒ View [nav/brand.blade.php] has been modified. Skipping...
    ⇒ View [auth/register-common-form.blade.php] has been modified. Skipping...
    ⇒ View [nav/support.blade.php] is new. Installing...
Updating Spark Directory: 
Removing Temporary Download Directory: 
You are now running on Spark v3.0.5. Enjoy!

Enjoy your Spark in the newest version!