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

No changes needed.

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.