41 lines
1.2 KiB
PHP
41 lines
1.2 KiB
PHP
|
|
<?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'),
|
||
|
|
];
|
||
|
|
}
|
||
|
|
}
|