silent-auction/app/Filament/Resources/JudgesResource.php

65 lines
1.6 KiB
PHP
Raw Normal View History

2022-08-06 15:39:24 -04:00
<?php
namespace App\Filament\Resources;
use App\Filament\Resources\JudgesResource\Pages;
use App\Filament\Resources\JudgesResource\RelationManagers;
use App\Models\Judges;
use Filament\Forms;
use Filament\Resources\Form;
use Filament\Resources\Resource;
use Filament\Resources\Table;
use Filament\Tables;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\SoftDeletingScope;
2022-08-06 18:50:26 -04:00
use Filament\Tables\Columns\TextColumn;
use Filament\Forms\Components\TextInput;
2022-08-06 15:39:24 -04:00
class JudgesResource extends Resource
{
protected static ?string $model = Judges::class;
protected static ?string $navigationIcon = 'heroicon-o-collection';
public static function form(Form $form): Form
{
return $form
->schema([
2022-08-06 18:50:26 -04:00
TextInput::make('judge_number'),
2022-08-06 15:39:24 -04:00
]);
}
public static function table(Table $table): Table
{
return $table
->columns([
2022-08-06 18:50:26 -04:00
TextColumn::make('judge_number')->sortable(),
2022-08-06 15:39:24 -04:00
])
->filters([
//
])
->actions([
Tables\Actions\EditAction::make(),
])
->bulkActions([
Tables\Actions\DeleteBulkAction::make(),
]);
}
public static function getRelations(): array
{
return [
//
];
}
public static function getPages(): array
{
return [
'index' => Pages\ListJudges::route('/'),
'create' => Pages\CreateJudges::route('/create'),
'edit' => Pages\EditJudges::route('/{record}/edit'),
];
}
}