laravel / nova-issues

557 stars 34 forks source link

Error when a parameter is added in the Resource constructor #4654

Closed felipe-dsdev closed 2 years ago

felipe-dsdev commented 2 years ago

Description:

I'm extending the Laravel\Nova\Resource class, however when adding additional parameters in the constructor for the Laravel DI to include the classes, the following error is returned:

Too few arguments to function Laravel\Nova\Tools\ResourceManager::Laravel\Nova\Tools\{closure}(), 1 passed and exactly 2 expected

image

Detailed steps to reproduce the issue on a fresh Nova installation:

crynobone commented 2 years ago

Such customization isn't supported by Nova.