Open sanneterpstra opened 4 years ago
spatie/laravel-translatable stores everything in JSON field. So you must use that JSON field to generate slug from on your model.
public function getSlugOptions(): SlugOptions
{
return SlugOptions::create()
->generateSlugsFrom('name->en')
->saveSlugsTo('slug');
}
I haven't tried optimistdigital/nova-translatable and I don't know how it wraps native fields. So you have to try that yourself. But, I know it works with spatie/nova-translatable package.
Is there an easy way to implement translatable slugs? I'm using the optimistdigital/nova-translatable package but this gives me an error on the keyup event.