Closed orchie closed 2 years ago
@orchie You either did not install the package spatie/laravel-translatable
or did not configure the model
package
thanks~ this ok. I forgot use Spatie\Translatable\HasTranslations in my Model
and other problems:
NovaTabTranslatable::make([
Image::make('Img','img'),
Text::make("Url", 'url')->default("aa"),
]),
the default is invalid, if the value is not required and not input the data [url] in database is like this
{"hk": null}
will drop other langs.
and i test img field,upload two langs , but only one saved. data [img] like this
{"en": "UJnTiXQFF6AGWshQUVw8Y8BU0yRv8kpXHM2ug8Z3.jpg"}
thanks~
@kongulov hi, the field "Image" has bugs... like this
package
thanks~ this ok. I forgot use Spatie\Translatable\HasTranslations in my Model
and other problems:
NovaTabTranslatable::make([ Image::make('Img','img'), Text::make("Url", 'url')->default("aa"), ]),
the default is invalid, if the value is not required and not input the data [url] in database is like this
{"hk": null}
will drop other langs.
and i test img field,upload two langs , but only one saved. data [img] like this
{"en": "UJnTiXQFF6AGWshQUVw8Y8BU0yRv8kpXHM2ug8Z3.jpg"}
thanks~
@orchie I have corrected the default value. I am looking for image solutions
@orchie https://github.com/kongulov/nova-tab-translatable/commit/f163f17da08dda48574a4837e3cb394b7ffc8b84 All is ready. Many changes and additions were made to make the file work.
@kongulov thank you very much!I will try later.
@orchie After checking, say whether everything is ok or not
when I tried save, it throw an exception like title. the config file tab-translatable.php is default . 'source' => 'array'
please help~ thanks~