Select::make('from')
->label(__('From'))
->live()
->options(function () {
return Channel::where('user_id', auth()->id())
->where('type', 'imap')
->pluck('name', 'id');
})
->required(),
RichEditor::make('body')
->label(__('Message'))
->reactive()
->toolbarButtons([
'blockquote',
'bold',
'bulletList',
'codeBlock',
'h2',
'h3',
'italic',
'link',
'orderedList',
'redo',
'strike',
'underline',
'undo',
])
->formatStateUsing(fn(Get $get) => '<br><br>' . Channel::find($get('from'))?->settings['signature'] ?? '')
->required()
Select::make('from')
->label(__('From'))
->live()
->options(function () {
return Channel::where('user_id', auth()->id())
->where('type', 'imap')
->pluck('name', 'id');
})
->required(),
RichEditor::make('body')
->label(__('Message'))
->reactive()
->toolbarButtons([
'blockquote',
'bold',
'bulletList',
'codeBlock',
'h2',
'h3',
'italic',
'link',
'orderedList',
'redo',
'strike',
'underline',
'undo',
])
->formatStateUsing(fn(Get $get) => '<br><br>' . Channel::find($get('from'))?->settings['signature'] ?? '')
->required()