nova-inline-relationship
nova-inline-relationship copied to clipboard
Doesn't work with NovaDependencyContainer package
When i try to use it inside NovaDependencyContainer for example
`<NovaDependencyContainer::make([
HasOne::make('ResaleTerm','resaleterm',ResaleTerm::class)->inline(),
])->dependsOn('premium', false),>`
It doesn't give me any error but the related model is not created , any idea why this might happens ? Thank you :)
@navneetrai any update about this ? its happening on resolving fields and mapping
@Reham-Walid @bsormagec Thanks for reporting this! We've never tried to use this with the NovaDependencyContainer package. But since you are both asking about it we will take a look at it soon.
In my case, the code bellow works perfectly
NovaDependencyContainer::make([
BelongsTo::make(__('Person'), 'person', Person::class)->inline(),
])
->dependsOn('type', 'individual'),
I am telling different case @yuriy-martini dream it like when using NovaDependencyContainer on BelongsTo Related resource if you add a NovaDependency to Person Resource you can see error.
@Reham-Walid @bsormagec @yuriy-martini We have started work on a branch that addresses third party package creation and updating issues. We have started the development on it using Nova Dependency Container as the guinea pig.
@brandonferens I'm the maintainer of the nova dependency container. Is there chance I can see any progress for the branch addressing the compatibility issues?
I dived into your code to see why MorphTo and other relational fields aren't working, and well the why is quite obvious. One of the main problems of all nova packages is that everybody is just extending some field components and overwrite methods to make it work.
If we're going to make these two compatible, I suggest we start by implementing some contracts that, for example, the nova dependency container is nesting fields. This would make it easier to filter the component when resolving e.g.
if($component instanceof NestableFields) {
// resolve package
}
The question more or less, where do we get these contracts. There a similar discussions spread on different forums / github, but I have yet to see an attempt to make a global third party package to include and defines behaviour for other packages to implement.
Cheers