feat: tambah Filament 5 resources dengan schemas dan tables

This commit is contained in:
2026-04-03 04:22:34 +07:00
parent 401aa30ce8
commit aef6978b2a
48 changed files with 1211 additions and 0 deletions
@@ -0,0 +1,40 @@
<?php
namespace App\Filament\Resources\Votes;
use App\Filament\Resources\Votes\Pages\CreateVote;
use App\Filament\Resources\Votes\Pages\EditVote;
use App\Filament\Resources\Votes\Pages\ListVotes;
use App\Filament\Resources\Votes\Schemas\VoteForm;
use App\Filament\Resources\Votes\Tables\VotesTable;
use App\Models\Vote;
use Filament\Resources\Resource;
use Filament\Schemas\Schema;
use Filament\Tables\Table;
class VoteResource extends Resource
{
protected static ?string $model = Vote::class;
protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-check-badge';
protected static string|\UnitEnum|null $navigationGroup = 'Keputusan';
protected static ?string $modelLabel = 'Voting';
public static function form(Schema $form): Schema
{
return VoteForm::configure($form);
}
public static function table(Table $table): Table
{
return VotesTable::configure($table);
}
public static function getPages(): array
{
return [
'index' => ListVotes::route('/'),
'create' => CreateVote::route('/create'),
'edit' => EditVote::route('/{record}/edit'),
];
}
}