nova-inline-relationship
nova-inline-relationship copied to clipboard
Fatal Error -> Nova::serving(function (ServingNova $event)
I wanted to use the Integration available for the NovaDependencyContainer.
The normal compose require kirschbaum-development/nova-inline-relationship
did not pull the integrations folder, hence I used compose require kirschbaum-development/nova-inline-relationship:dev-master
.
Now, When I use the package in my code I get the below error, also in link - https://flareapp.io/share/W7zGgA5w#F45
Symfony\Component\Debug\Exception\FatalThrowableError Argument 1 passed to KirschbaumDevelopment\NovaInlineRelationship\NovaInlineRelationshipServiceProvider::KirschbaumDevelopment\NovaInlineRelationship{closure}() must be an instance of KirschbaumDevelopment\NovaInlineRelationship\ServingNova, instance of Laravel\Nova\Events\ServingNova given, called in /var/www/html/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php on line 347
@navneetrai please help !
@rishinikhil Yeah, we haven't released a new tag with the new integration system yet, which is why you are having to pull from dev-master. But that is an interesting issue. I will spend some time trying to reproduce this error. I may have some questions for you along the way.
@rishinikhil It appears that a change was overwritten during a merge. It should be fixed now. Please pull in the latest code from dev-master
and let me know if things are back to working again.
@brandonferens Thanks a lot for your reply 👍
The reason I wanted to try on the integration system was because I was getting the below error
I had checked out the commits and tested by making the change locally which you have made in the last commit. Now to help you better understand how I am using the NovaDependencyContainer
, I am sharing the code snippets.
The resource from where the inline function in called: public function fields(Request $request) { return [ ID::make()->sortable(), BelongsTo::make('School'), HasOne::make('Levels', 'levels', Level::class)->inline(), ]; }`
The content of the resource Levels
:
public function fields(Request $request) {
return [
ID::make()->sortable(),
Boolean::make('Role Plays Conducted', 'role_plays'),
NovaDependencyContainer::make([
File::make('Role Plays Attachment', 'file_role_plays'),
Text::make('Topic of Role Plays', 'role_play_topic'),
File::make('Role Play Topics Attachment', 'file_role_play_topic'),
])->dependsOn('role_plays', true),
Boolean::make('eLearning Classes Conducted', 'elearning'),
];
}
I hope I am trying to use the integration system in right way. Please advice what is the reason for the issue and how can I resolve it.
Thanks @rishinikhil. We will look into this and see if there is a good way to solve it.
I see no issue in the NovaDependencyContainer package, as when I run the Level resource, it works fine with no errors, it happens only when the it is run inline.
Any update on this @brandonferens
Any update @brandonferens