Filament Slug

In my filament slug is only work on English languages. When I create another languages, it's not working.
5 Replies
Shaung Bhone
Shaung BhoneOP2y ago
Dennis Koch
Dennis Koch2y ago
If you don’t provide any details nobody can help you
Shaung Bhone
Shaung BhoneOP2y ago
Forms\Components\TextInput::make('name')
->required()
->lazy()
->afterStateUpdated(fn (string $context, $state, callable $set) => $context === 'create' ? $set('slug', Str::slug($state)) : null),
Forms\Components\TextInput::make('slug')
->disabled()
->required()
->unique(Horse::class, 'slug', ignoreRecord: true),
Forms\Components\TextInput::make('name')
->required()
->lazy()
->afterStateUpdated(fn (string $context, $state, callable $set) => $context === 'create' ? $set('slug', Str::slug($state)) : null),
Forms\Components\TextInput::make('slug')
->disabled()
->required()
->unique(Horse::class, 'slug', ignoreRecord: true),
my slug is only work in English.
Dennis Koch
Dennis Koch2y ago
I guess it’s related to the slug method which replaces all non-ascii chars.
Shaung Bhone
Shaung BhoneOP2y ago
let me check thank you.
Want results from more Discord servers?
Add your server