schema([ Forms\Components\TextInput::make('key') ->required() ->disabledOn('edit') ->maxLength(255), Forms\Components\TextInput::make('subject') ->required() ->maxLength(255), Forms\Components\Toggle::make('enabled') ->required(), Forms\Components\MarkdownEditor::make('body') ->hint('Use either Markdown or HTML to compose the email body.') ->disableAllToolbarButtons() ->required() ->columnSpanFull(), Forms\Components\TagsInput::make('cc') ->placeholder('mail@example.com') ->nestedRecursiveRules(['required', 'email']) ->columnSpanFull(), Forms\Components\TagsInput::make('bcc') ->nestedRecursiveRules(['required', 'email']) ->placeholder('mail@example.com') ->columnSpanFull(), ]); } public static function table(Table $table): Table { return $table ->columns([ Tables\Columns\TextColumn::make('subject') ->searchable(), Tables\Columns\IconColumn::make('enabled') ->boolean(), ]) ->filters([ // ]) ->actions([ Tables\Actions\EditAction::make(), ]); } public static function getRelations(): array { return [ // ]; } public static function getPages(): array { return [ 'index' => Pages\ListEmailTemplates::route('/'), 'create' => Pages\CreateEmailTemplate::route('/create'), 'edit' => Pages\EditEmailTemplate::route('/{record}/edit'), ]; } }