How to get the select option label using $get?

Select::make('category')->relationship('category', 'name')->reactive(),
TextInput::make('slug')->prefix(fn ($get) => $get('category').'/')

From the code above, the slug prefix returns the 'id' of the category, of course....
But how to get the label instead of the value?
Was this page helpful?