I have a simple schema:
public static function configure(Schema $schema): Schema
{
return $schema
->components([
Hidden::make('editor_id')
->default(auth()->id()),
TextInput::make('title')
->label(__('Title'))
->required()
->maxLength(255),
DateTimePicker::make('published_at')
->label(__('Published at'))
->displayFormat('d.m.Y, H:i')
->native(false)
->seconds(false)
->nullable(),
RichEditor::make('body')
->label(__('Body'))
->columnSpan('full'),
Toggle::make('is_active')
->label(__('Active'))
->default(true),
]);
}
When I save this I got an QueryException because the rich editor field (body) is missing:
General error: 1364 Field 'body' doesn't have a default value (Connection: mysql, SQL: insert into `announcements` (`editor_id`, `title`, `published_at`, `is_active`, `updated_at`, `created_at`) values (1, zuguz, ?, 1, 2025-09-25 17:31:35, 2025-09-25 17:31:35))
If I replace the RichEditor with a Textarea field without any other changes it workes.