feat: anggota dapat menulis artikel dengan workflow approval sebelum diterbitkan

This commit is contained in:
2026-04-03 06:48:06 +07:00
parent 5d14b55173
commit a7e10600d4
12 changed files with 339 additions and 10 deletions
@@ -0,0 +1,30 @@
<?php
namespace App\Filament\Resources\MyPosts\Schemas;
use Filament\Forms\Components\RichEditor;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\TextInput;
use Filament\Schemas\Schema;
use Illuminate\Support\Str;
class MyPostForm
{
public static function configure(Schema $schema): Schema
{
return $schema->components([
TextInput::make('title')->label('Judul')->required()
->live(onBlur: true)
->afterStateUpdated(fn ($state, $set) => $set('slug', Str::slug($state))),
TextInput::make('slug')->required()->unique(ignoreRecord: true),
Select::make('category')->label('Kategori')
->options([
'umum' => 'Umum',
'pengumuman' => 'Pengumuman',
'berita' => 'Berita',
])
->default('umum')->required(),
RichEditor::make('content')->label('Konten')->required()->columnSpanFull(),
]);
}
}