orlyapps / nova-belongsto-depend

Larave Nova BelongsTo Field with Dependcy
MIT License
182 stars 65 forks source link

nova-belongsto-depend not working when used inside tabs #14

Closed lvdhoorn closed 5 years ago

lvdhoorn commented 5 years ago

I was trying to make a belongs to field working with a dependency.

I keep getting this error: Can not find the Field "countryweek" in the Model "App\Nova\Expense"

The code was like this: new NovaTab('General information', [ NovaBelongsToDepend::make('Week') ->options(\App\Week::all()), NovaBelongsToDepend::make('countryweek') ->optionsResolve(function ($weeks) { return 'hello'; }) ->dependsOn('Week') , ]),

Then at some point i figured out that the fact that the field is inside a NovaTab that the nova-belongsto-depend class can't find the field. It would be nice if it is possible to use this solutions inside the NovaTab module.

orlyapps commented 5 years ago

Hello, thanks for the issue. I will look into it :)

emilianotisato commented 5 years ago

Hello @orlyapps any update on this?

Thanks by the way!!

orlyapps commented 5 years ago

this should be fixed now.