38 lines
1.2 KiB
PHP
38 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\FeedbackChannels\Schemas;
|
|
|
|
use Filament\Forms\Components\ColorPicker;
|
|
use Filament\Forms\Components\TextInput;
|
|
use Filament\Forms\Components\Toggle;
|
|
use Filament\Schemas\Components\Section;
|
|
use Filament\Schemas\Schema;
|
|
|
|
class FeedbackChannelForm
|
|
{
|
|
public static function configure(Schema $schema): Schema
|
|
{
|
|
return $schema
|
|
->components([
|
|
Section::make()
|
|
->schema([
|
|
TextInput::make('name')
|
|
->required()
|
|
->maxLength(255),
|
|
TextInput::make('slug')
|
|
->required()
|
|
->maxLength(255)
|
|
->unique(ignoreRecord: true),
|
|
TextInput::make('icon')
|
|
->maxLength(255)
|
|
->hint('Heroicon name or emoji'),
|
|
ColorPicker::make('color')
|
|
->label('Color'),
|
|
Toggle::make('is_active')
|
|
->default(true),
|
|
])
|
|
->columns(2),
|
|
]);
|
|
}
|
|
}
|