Learn how to customize the CSS and JavaScript of your Nova application.
Nova.request()
method to make XHR requests to backend routes provided by your application or custom tools, cards, and fields. The Nova.request()
method is powered by Axios and offers the same API. However, the Nova.request()
method configures its own instance of Axios that has pre-configured interceptors to properly handle and redirect on 401
, 403
, and 500
level HTTP server responses:
Nova
JavaScript object offers a visit
method that may be invoked to navigate to other URLs within your Nova dashboard:
visit
method accepts an array of navigation options as its second argument. As the visit
method uses Inertia’s own visit
method behind the scenes, all of Inertia’s visit
options are supported by Nova’s visit
method:
Nova
JavaScript object may be used as an event bus by your custom components. The bus provides the following methods, which correspond to and have the same behavior as the event methods provided by tiny-emitter:
success
, error
, info
, or warning
methods on the global Nova
object:
Nova
JavaScript object’s config
method allows you to get the current Nova base
path and userId
configuration values:
Nova::provideToScript
method. You may call this method within a Nova::serving
listener, which should typically be registered in the boot
method of your application or custom component’s service provider:
provideToScript
method, you may access it using the global Nova
JavaScript object’s config
method:
NovaServiceProvider
. To learn more, please consult the full custom localization documentation.
nova-components
directory of a Laravel application can utilize laravel-nova
mixins by importing nova.mix.js
Mix Extension from the Nova Devtool installation that is located within your root application’s vendor
directory. This extension should be placed in your package’s webpack.mix.js
:
3
and require NPM 9+.laravel/nova-devtool
Composer package to be installed: