feat: tambah Filament 5 resources dengan schemas dan tables
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Votes\Schemas;
|
||||
|
||||
use Filament\Forms\Components\DateTimePicker;
|
||||
use Filament\Forms\Components\Select;
|
||||
use Filament\Forms\Components\Textarea;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Schemas\Schema;
|
||||
|
||||
class VoteForm
|
||||
{
|
||||
public static function configure(Schema $schema): Schema
|
||||
{
|
||||
return $schema->components([
|
||||
TextInput::make('title')->label('Judul')->required(),
|
||||
Textarea::make('description')->label('Deskripsi')->rows(3)->columnSpanFull(),
|
||||
Select::make('type')->options([
|
||||
'activity' => 'Kegiatan',
|
||||
'finance' => 'Keuangan',
|
||||
'general' => 'Umum',
|
||||
])->required(),
|
||||
Select::make('status')
|
||||
->options(['open' => 'Buka', 'closed' => 'Tutup'])
|
||||
->default('open')
|
||||
->required(),
|
||||
DateTimePicker::make('deadline')->label('Batas Waktu'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user