Edit

Upgrade Guide


This will guide you to upgrade from Backpack v6 to v7. The steps are color-coded by the probability that you will need it for your application: High, Medium and Low. At the very least, please read what's in bold.

Requirements

Please make sure your project respects the requirements below, before you start the upgrade process. You can check with php artisan backpack:version:

  • PHP 8.1+
  • Laravel 11.x
  • Backpack\CRUD 6.x
  • 5-10 minutes (for most projects)

If you're running Backpack version 3.x-5.x, please follow ALL other upgrade guides first, to incrementally get to use Backpack v6. Test that your app works well with each version, after each upgrade. Only afterwards can you follow this guide, to upgrade from v5 to v6. Previous upgrade guides:

Upgrade Steps

Step 0. Upgrade to Laravel 11 if you don't use it yet, then test to confirm your app is working fine.

Composer

Step 1. Update your composer.json file to require:

        "backpack/crud": "v7-dev",

Step 2. Bump the version of any first-party Backpack add-ons you have installed (eg. backpack/pro, backpack/editable-columns etc.) to the versions that support Backpack v6. For 3rd-party add-ons, please check each add-on's Github page. Here's a quick list of 1st party packages and versions:

        "backpack/crud": "v7-dev",
        "backpack/pro": "v3-dev",
        "backpack/filemanager": "^3.0",
        "backpack/theme-coreuiv2": "^1.0",
        "backpack/theme-coreuiv4": "^1.0",
        "backpack/theme-tabler": "^1.0",
        "backpack/logmanager": "^5.0",
        "backpack/settings": "^3.1",
        "backpack/newscrud": "^5.0",
        "backpack/permissionmanager": "^7.0",
        "backpack/pagemanager": "^3.2",
        "backpack/menucrud": "^4.0",
        "backpack/backupmanager": "^5.0",
        "backpack/editable-columns": "^3.0",
        "backpack/revise-operation": "^2.0",
        "backpack/medialibrary-uploaders": "^1.0",
        "backpack/devtools": "^2.0",

Step 3. Let's get the latest Backpack and install it. If you get any conflicts with Backpack 1st party add-ons, most of the time you just need to move one version up, eg: from backpack/menucrud: ^3.0 to backpack/menucrud: ^4.0. See the step above again. Please run:

composer update

# before calling the next command make sure you have no pending migrations with `php artisan migrate:status`
# and that your webserver is running and accessible in the URL you defined in .env `APP_URL`.
php artisan backpack:upgrade

// TODO: actually create an upgrade command that does only the things we need from the install command.

Models

No changes needed.

Form Requests

No changes needed.

Routes

No changes needed.

Config

No changes needed.

CrudControllers

Step X. The wysiwyg field and column have been removed, because they were hiding functionality. But don't worry, they were just alias columns. Behind the scenes, they were just loading the ckeditor field and text column respectively. If you're using the wysiwyg column of field in your CrudController, replace them with their originals.

Step X. The ckeditor field and column have been moved from the PRO package to an open-source addon. If you are using either of them and want to keep doing so, just run composer require backpack/ckeditor-field. Please note that CKEditor is a 3rd party JS library that requires payment when used for commercial purposes (GPL licensed). See their pricing page for options. We can give away a few sub-licenses every year - contact us to see if any are still available. If you would rather move away from CKEditor, you can just change your field/column to use summernote instead, they are both HTML editors so your content should be compatible. Summernote has more limited editing options, but it's MIT-licensed.

Step X. Similarly, the tinymce field and column have been moved from the PRO package to an open-source addon. If you are using either of them and want to keep doing so, just run composer require backpack/tinymce-field. Please note that TinyMCE is a 3rd party JS library that normally requires payment when used for commercial purposes (GLP licensed). See their pricing page for options. You can sign-up for free commercial licenses on their website here. If you would rather move away from TinyMCE, you can just change your field/column to use summernote instead, they are both HTML editors so your content should be compatible. Summernote has more limited editing options, but it's MIT-licensed.

CSS & JS Assets

No changes needed.

Views

No changes needed.

Security

No changes needed.

Cache

Step xx. Clear your app's cache:

php artisan config:clear
php artisan cache:clear
php artisan view:clear

If the table view still looks wonky (search bar out of place, big + instead of ellipsis), then do a hard-reload in your browser (Cmd+Shift+R or Ctrl+Shift+F5) to purge the browser cache too.


Step yy. If your pages are slow to load, that's because Basset caching the assets as you load the pages, so your first pageload will be quite slow. If you find that annoying, run php artisan basset:cache to cache all CSS and JS assets. Alternatively, if you want Basset NOT to run because you're making changes to CSS and JS files, you can add BASSET_DEV_MODE=true to your .ENV file.


Upgrade Add-ons

For any addons you might have upgraded, please double-check if they have an upgrade guide. For example:

  • Xx package has the upgrade guide here;
  • Yy package has the upgrade guide here;

You're done! Good job. Thank you for taking the time to upgrade. Now you can:

Like our open-core?

Then you'll love our premium add-ons - productivity tools and tons of new features.