mirror of
https://github.com/anna-sara/vbytes_lan.git
synced 2026-09-03 14:35:22 +02:00
39 lines
1.2 KiB
PHP
39 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\Mailtemplates\Schemas;
|
|
|
|
use App\Models\Smstemplate;
|
|
use Filament\Forms\Components\Select;
|
|
use Filament\Forms\Components\TextInput;
|
|
use Filament\Forms\Components\Toggle;
|
|
use Filament\Schemas\Schema;
|
|
use Filament\Forms\Components\MarkdownEditor;
|
|
use DiscoveryDesign\FilamentGaze\Forms\Components\GazeBanner;
|
|
|
|
class MailtemplateForm
|
|
{
|
|
public static function configure(Schema $schema): Schema
|
|
{
|
|
return $schema
|
|
->components([
|
|
GazeBanner::make()
|
|
->pollTimer(10)
|
|
->hideOnCreate(),
|
|
TextInput::make('title')
|
|
->required()
|
|
->columnSpanFull(),
|
|
MarkdownEditor::make('content')
|
|
->required()
|
|
->columnSpanFull(),
|
|
Select::make('smstemplate_id')
|
|
->label('SMS template')
|
|
->options(Smstemplate::where('draft', false)->pluck('title', 'id'))
|
|
->nullable()
|
|
->columnSpanFull(),
|
|
Toggle::make('draft')
|
|
->default(false)
|
|
->onColor('warning')
|
|
->columnSpanFull(),
|
|
]);
|
|
}
|
|
}
|