# Nova Resources

**Package:** Laravel Modules | **Version:** 3 | **URL:** https://mozex.dev/docs/laravel-modules/v3/features/nova-resources

---

Nova resource classes inside modules are discovered and registered during Nova's `serving` event. This means they only load when someone accesses the Nova admin panel, not on every application request.

Classes extending `Laravel\Nova\Actions\ActionResource` are automatically excluded from discovery, since those are internal to Nova's action system.

Like Livewire and Filament, this feature is conditional. If Nova isn't installed, the package skips it entirely.

## Default configuration

```php
'nova-resources' => [
    'active' => true,
    'patterns' => [
        '*/Nova',
    ],
],
```

## Directory layout

```
Modules/Blog/
└── Nova/
    ├── Post.php
    └── Category.php

Modules/Shop/
└── Nova/
    ├── Product.php
    └── Order.php
```

## Writing Nova resources

Module Nova resources are standard Nova resource classes. The only difference is the namespace:

```php
namespace Modules\Blog\Nova;

use Laravel\Nova\Resource;
use Laravel\Nova\Fields\ID;
use Laravel\Nova\Fields\Text;
use Laravel\Nova\Fields\Markdown;
use Laravel\Nova\Http\Requests\NovaRequest;
use Modules\Blog\Models\Post;

class Post extends Resource
{
    public static $model = Post::class;

    public static $title = 'title';

    public static $search = ['id', 'title'];

    public function fields(NovaRequest $request): array
    {
        return [
            ID::make()->sortable(),
            Text::make('Title')->sortable()->rules('required'),
            Markdown::make('Body')->rules('required'),
        ];
    }
}
```

The resource appears in the Nova sidebar alongside your application's resources. No manual registration needed.

## Model and policy resolution

Nova resources in modules work with the [Models & Factories](https://mozex.dev/docs/laravel-modules/v3/features/models-factories) and [Policies](https://mozex.dev/docs/laravel-modules/v3/features/policies) features. A `Modules\Blog\Nova\Post` resource pointing to `Modules\Blog\Models\Post` will automatically find `Modules\Blog\Policies\PostPolicy` for authorization.

## Registration timing

Nova resources are registered inside a `Nova::serving()` callback. They don't load during normal web requests or Artisan commands, only when Nova's routes are being served. This keeps the overhead at zero for non-Nova requests.

## Disabling

Set `'nova-resources.active' => false` to disable discovery. Adjust `'nova-resources.patterns'` if your Nova resources live in a different directory.

---

## Table of Contents

- [Introduction](https://mozex.dev/docs/laravel-modules/v3)
- [AI Integration](https://mozex.dev/docs/laravel-modules/v3/ai-integration)
- [Support Us](https://mozex.dev/docs/laravel-modules/v3/support-us)
- [Requirements](https://mozex.dev/docs/laravel-modules/v3/requirements)
- [Changelog](https://mozex.dev/docs/laravel-modules/v3/changelog)
- [Contributing](https://mozex.dev/docs/laravel-modules/v3/contributing)
- [Questions & Issues](https://mozex.dev/docs/laravel-modules/v3/questions-and-issues)
- [About Mozex](https://mozex.dev/docs/laravel-modules/v3/about)

### Features

- [Blade Components](https://mozex.dev/docs/laravel-modules/v3/features/blade-components)
- [Views](https://mozex.dev/docs/laravel-modules/v3/features/views)
- [Routes](https://mozex.dev/docs/laravel-modules/v3/features/routes)
- [Configs](https://mozex.dev/docs/laravel-modules/v3/features/configs)
- [Migrations](https://mozex.dev/docs/laravel-modules/v3/features/migrations)
- [Seeders](https://mozex.dev/docs/laravel-modules/v3/features/seeders)
- [Commands](https://mozex.dev/docs/laravel-modules/v3/features/commands)
- [Helpers](https://mozex.dev/docs/laravel-modules/v3/features/helpers)
- [Models & Factories](https://mozex.dev/docs/laravel-modules/v3/features/models-factories)
- [Policies](https://mozex.dev/docs/laravel-modules/v3/features/policies)
- [Events & Listeners](https://mozex.dev/docs/laravel-modules/v3/features/events-listeners)
- [Service Providers](https://mozex.dev/docs/laravel-modules/v3/features/service-providers)
- [Translations](https://mozex.dev/docs/laravel-modules/v3/features/translations)
- [Caching](https://mozex.dev/docs/laravel-modules/v3/features/caching)
- [Listing Modules](https://mozex.dev/docs/laravel-modules/v3/features/listing)
- [Livewire Components](https://mozex.dev/docs/laravel-modules/v3/features/livewire-components)
- [Filament](https://mozex.dev/docs/laravel-modules/v3/features/filament)
- [Nova Resources](https://mozex.dev/docs/laravel-modules/v3/features/nova-resources)

### Integrations

- [PHPStan](https://mozex.dev/docs/laravel-modules/v3/integrations/phpstan)
- [PHPUnit](https://mozex.dev/docs/laravel-modules/v3/integrations/phpunit)
- [Pest](https://mozex.dev/docs/laravel-modules/v3/integrations/pest)
- [Inertia](https://mozex.dev/docs/laravel-modules/v3/integrations/inertia)