[
Fieldset::make('User')
->relationship('users')
->schema([
TextInput::make('name')
->required(),
]),
TextInput::make('slug')
->dehydrateStateUsing(
fn(string $state, callable $get) => Str::slug($get('user.name')) // <-- when get this, the value is null
)
]
[
Fieldset::make('User')
->relationship('users')
->schema([
TextInput::make('name')
->required(),
]),
TextInput::make('slug')
->dehydrateStateUsing(
fn(string $state, callable $get) => Str::slug($get('user.name')) // <-- when get this, the value is null
)
]