Learn how to install Laravel Nova into your Laravel application.
composer.json
file:
composer.json
file:
laravel/nova
to your list of required packages in your composer.json
file:
composer.json
file has been updated, run the composer update
command in your console terminal:
composer update
, you will be prompted to provide a username and password. You should use your Nova website email for the username and a license key should be used as the password. These credentials will authenticate your Composer session as having permission to download the Nova source code.
To avoid manually typing these credentials, you may create a Composer auth.json file while using your license key in place of your password:
nova:install
and migrate
Artisan commands. The nova:install
command will install Nova’s service provider and public assets within your application:
App\Nova\User
Nova resource references the App\Models\User
model. If you place your models in a different directory or namespace, you should adjust this value within the resource:
users
table, you can add one by running the nova:user
Artisan command and following the prompts:
/nova
path in your browser and you should be greeted with the Nova dashboard which includes links to various parts of this documentation.
*.laravel.com
).license_key
option in your config/nova.php
configuration file:
nova:check-license
command:
auth.json
file inside your project’s source control repository. However, there may be times you wish to download Nova inside a CI environment like CodeShip. For instance, you may wish to run tests for any custom tools you create.
To authenticate Nova in these situations, you can use Composer’s config
command to set the configuration option inside your CI system’s pipeline, injecting environment variables containing your Nova username and license key:
localhost
or local TLDs like those specified in IETF RFC 2606:
.test
.example
.invalid
.localhost
.local
staging.
stage.
test.
testing.
dev.
development.
app/Providers/NovaServiceProvider.php
file, there is a gate
method. This authorization gate controls access to Nova in non-local environments. By default, any user can access the Nova dashboard when the current application environment is local
. You are free to modify this gate as needed to restrict access to your Nova installation:
brand.logo
configuration item within your application’s config/nova.php
configuration file. This configuration value should contain an absolute path to the SVG file of the logo you would like to use:
brand.colors
configuration item within your application’s config/nova.php
configuration file. This color will be used as the primary button color as well as the color of various emphasized items throughout the Nova interface. This configuration value should be a valid RGB, RGBA, or HSL string value:
Nova::footer
method, you may customize the footer text of your Nova installation. Typically, the footer
method should be called within the boot
method of your application’s App\Providers\NovaServiceProvider
class:
auth
configuration file. If you would like to customize this guard, you may set the guard
value within Nova’s configuration file:
auth
configuration file. If you would like to customize this broker, you may set the passwords
value within Nova’s configuration file:
filesystems
configuration file. If you would like to customize this disk, you may set the storage_disk
value within Nova’s configuration file:
Main
dashboard is typically loaded by default. However, you are free to define a different initial path that should be loaded using Nova’s initialPath
method. Typically, this method may be invoked from the register
method of your application’s App\Providers\NovaServiceProvider
service provider:
initialPath
method also accepts a closure that returns the path that should be loaded. This allows you to dynamically determine the initial path based on the incoming request:
Nova::withBreadcrumbs
method. This method should be invoked from within the boot
method of your application’s App\Providers\NovaServiceProvider
class:
withBreadcrumbs
method also accepts a closure that allows you to enable breadcrumbs for specific users or other custom scenarios:
enableRTL
method from your App\Providers\NovaServiceProvider
service provider:
enableRTL
method also accept a closure that allows you to enable RTL support for specific users or in other custom scenarios:
withoutThemeSwitcher
method from your App/Providers/NovaServiceProvider
:
App\Exceptions\ExceptionHandler
. If you need to integrate third-party error reporting tools with your Nova installation, you should use the Nova::report
method. Typically, this method should be invoked from the register
method of your application’s App\Providers\NovaServiceProvider
class:
composer update
command:
nova:publish
Artisan command and clear any cached views using the view:clear
Artisan command. This will ensure the newly-updated Nova version is using the latest versions of Nova’s assets and views:
nova:publish
command will re-publish Nova’s public assets, configuration, views, and language files. This command will not overwrite any existing configuration, views, or language files. If you would like the command to overwrite existing files, you may use the --force
flag when executing the command:
composer.json
file to automatically publish Nova’s latest assets: