Skip to content

Slug field not generating when using translatable title field in Laravel Nova #143

@Dimitris947

Description

@Dimitris947

When using the package in a Laravel Nova resource, the Slug field does not generate a slug automatically when set to generate from a translatable title field.

Text::make('Title')->translatable(), Slug::make('Slug')->from('Title'),

Expected:
Nova should automatically generate the slug from the title field (default locale).

Actual:
The slug is not generated at all.

Notes:
The title field is stored as JSON in the database (e.g., { "en": "My Post", "el": "Η Ανάρτησή μου" })

Nova does not seem to recognize the translatable field correctly as a source for Slug::make()->from()

Please consider adding support for generating slugs from translatable fields or at least defaulting to the application's current locale.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions