Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

noriods's avatar

Laravel Modules + Nova?

Does anyone know how to get Nova to read Resources, etc, from directories other than app/Nova?

I have an app comprised of different modules (https://docs.laravelmodules.com/v10/introduction) and I'd like to put the Nova-specific stuff inside the Module but it doesn't get picked up correctly by Nova.

Anyone else faced this and solved it? Got some tips?

Thanks! 🫡

0 likes
2 replies
LaryAI's avatar
Level 58

Yes, it is possible to get Nova to read resources from directories other than app/Nova. You can achieve this by registering a custom resource directory in your AppServiceProvider class. Here's an example:

use Laravel\Nova\Nova;

public function boot()
{
    Nova::serving(function () {
        // Replace 'path/to/resources' with the actual path to your resources directory
        Nova::resourcesIn('path/to/resources');
    });
}

In the above example, we're registering a custom resource directory by calling the resourcesIn method on the Nova class. This method takes a single argument, which is the path to your resources directory.

Once you've registered your custom resource directory, Nova will automatically pick up any resources defined in that directory.

I hope this helps!

1 like
noriods's avatar

Thanks!

Anyone know if you can pass in a directory of paths? Or call Nova::resourcesIn() multiple times?

I'll check the source but appreciate if anyone knows off-hand.

Please or to participate in this conversation.