Open gldrenthe89 opened 4 years ago
The error mentions a closure, which one is it ? Is it a closure in Spatie's package or one you defined ?
If it's in Spatie's package, that means they published a release that breaks compatibility with this package. I'd suggest to open an issue on their repository explaining they shouldn't type-hint model classes in fonction arguments for scenarios like these where the package isn't used on models.
I have also tried to use the mrmonat/nova-translatable wich gives met the same error.
When i have time i will reproduce both errors from both packages en post them here.
Both packages use spatie/laravel-translatable
, the issue could come from a closure defined in that package.
now i there is happening something really weird.
when using mrmonat/nova-translatable the field is stored in the database as expected. But it is not readable in Nova. Also when updating it is getting messed up
"breadcrumb" : [
"{",
"\"",
"d",
"e",
"\"",
":",
"\"",
"t",
"e",
"s",
"t",
"\"",
",",
"\"",
"n",
"l",
"\"",
":",
"\"",
"t",
"e",
"s",
"t",
"\"",
"}"
],
i also tried Spatie\NovaTranslatable again and that is giving a different error: Method App\Nova\Templates\TermsPage::setTranslation does not exist.
i understand this message and it doesn;t really bother me because i wanna use the other package noted above
Argument 2 passed to Spatie\NovaTranslatable\Translatable::Spatie\NovaTranslatable{closure}() must be an instance of Illuminate\Database\Eloquent\Model, instance of App\Nova\Templates\Home given
Using Spatie\NovaTranslatable.