2022-08-07 12:48:05 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Filament\Resources\VehicleScoresResource\RelationManagers;
|
|
|
|
|
|
|
|
use Filament\Forms;
|
|
|
|
use Filament\Resources\Form;
|
|
|
|
use Filament\Resources\RelationManagers\RelationManager;
|
|
|
|
use Filament\Resources\Table;
|
|
|
|
use Filament\Tables;
|
|
|
|
use Illuminate\Database\Eloquent\Builder;
|
|
|
|
use Illuminate\Database\Eloquent\SoftDeletingScope;
|
|
|
|
|
|
|
|
class JudgeRelationManager extends RelationManager
|
|
|
|
{
|
|
|
|
protected static string $relationship = 'judge';
|
|
|
|
|
|
|
|
protected static ?string $recordTitleAttribute = 'judge';
|
|
|
|
|
|
|
|
public static function form(Form $form): Form
|
|
|
|
{
|
|
|
|
return $form
|
|
|
|
->schema([
|
2022-08-08 21:05:06 -04:00
|
|
|
Forms\Components\TextInput::make('judge_number')
|
2022-08-07 12:48:05 -04:00
|
|
|
->required()
|
|
|
|
->maxLength(255),
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
|
|
|
|
public static function table(Table $table): Table
|
|
|
|
{
|
|
|
|
return $table
|
|
|
|
->columns([
|
2022-08-08 21:05:06 -04:00
|
|
|
Tables\Columns\TextColumn::make('judge_number'),
|
2022-08-07 12:48:05 -04:00
|
|
|
])
|
|
|
|
->filters([
|
|
|
|
//
|
|
|
|
])
|
|
|
|
->headerActions([
|
|
|
|
Tables\Actions\CreateAction::make(),
|
|
|
|
])
|
|
|
|
->actions([
|
|
|
|
Tables\Actions\EditAction::make(),
|
|
|
|
Tables\Actions\DeleteAction::make(),
|
|
|
|
])
|
|
|
|
->bulkActions([
|
|
|
|
Tables\Actions\DeleteBulkAction::make(),
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
}
|