Upgrade Guide
Learn how to upgrade your Laravel Nova installation to the latest version.
Dependency Upgrades
Nova’s upstream dependencies have been upgraded. You will find a complete list of our dependency upgrades below:
Server
- PHP 8.1+
- Laravel Framework 10.34+ and 11.0+
- Inertia Laravel 1.3+ and 2.0+
- Replaced
laravel/ui
withlaravel/fortify
v1.21+ - Removed
doctrine/dbal
Client
- Update to
@inertiajs/vue3
v2 - Update to Heroicons v2
- Update to
trix
v2 - Remove deprecated
form-backend-validation
- Remove deprecated
places.js
Updating Composer Dependencies
You should update your laravel/nova
dependency to ^5.0
in your application’s composer.json
file:
Next, install your updated Composer dependencies:
Updating Assets and Translations
Next, you should update your application’s Nova assets and translation files. To get started, you may run the following commands to update your assets and translations.
You may wish to store a copy of your current translation file before running this command so you can easily port any custom translations back into the new file after running these commands.:
Updating Third-Party Nova Packages
If your application relies on Nova tools or packages developed by third-parties, it is possible that these packages are not yet compatible with Nova 5.0 and will require an update from their maintainers.
Upgrading Authentication Features
Next, you will need to update your Nova configuration file. Ensure that the api_middleware
configuration option within your application’s nova
configuration file appears as follows:
Next, update the register
method in your application’s App\Providers\NovaServiceProvider
class to call the parent’s register
method. The parent::register()
method should be invoked before any other code in the method:
Updating Nova Components (Custom Tool, Cards, Fields, Filters)
Inertia 2 Compatibility
In Nova 5, Nova’s frontend JavaScript now utilizes Inertia.js 2.x, which will affect any projects that directly import from @inertiajs/inertia
or @inertiajs/inertia-vue3
. You should inspect your custom components and packages to ensure all references have been updated as suggested in Inertia’s upgrade guide.
Replacing form-backend-validation
The form-backend-validation
repository has been archived and should no longer be used by third-party packages or components. Instead, you may simply import Errors
from laravel-nova
:
Then, you may remove form-backend-validation
from your component’s package.json
:
Medium Impact Changes
Form Abandonment (Using Browser Navigation)
With the introduction of Inertia.js 2.x, we are no longer able to provide form abandonment warnings when using the browser’s back button.
Algolia Place Field Removed
Algolia retired their “Places” API on May 31, 2022; therefore, the Place
field was deprecated on Nova 4 and is now removed in Nova 5.
Low Impact Changes
Update Published Stubs
Due to various changes in Nova 5.x, you should re-publish the Nova “stubs” if you have previously published them. You can accomplish this by executing the nova:stubs
Artisan command with the --force
option:
Was this page helpful?