alexbowers / nova-multiple-dashboard

[DEPRECATED] - Support for multiple custom dashboards in Laravel Nova
MIT License
34 stars 7 forks source link

Ability to specify other Folder than App\Nova\Dashboard? #1

Closed shirshak55 closed 6 years ago

shirshak55 commented 6 years ago

Sometime we use modular laravel so there is no App folder at root directory like normal laravel installation. So is there anyway to handle those error like App namespace not found ?

Thanks

alexbowers commented 6 years ago

Where would the dashboards be stored for you? IN one of the modules with a Dashboard directory?

The code as it stands handles there being a different namespace for the dashboards, but it is currently expecting there to be a App/Nova path.

I can change that to be a config value that gets passed in, or I can change it so that it only autoloads those in if there is a directory that exists for App/Nova/Dashboards.

To load them in yourself you'd need to use your own ServiceProvider and call

\AlexBowers\MultipleDashboard\DashboardNova::registerDashboards(new \Your\Dashboard\Here);

yourself to register them all.

shirshak55 commented 6 years ago

Update:

Yea it works perfectly. Thanks

shirshak55 commented 6 years ago

Yea config would be better choice too :)