50 lines
1.3 KiB
PHP
50 lines
1.3 KiB
PHP
|
<?php
|
||
|
|
||
|
namespace App\Filament\Resources\CheckoutResource\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 BiddersRelationManager extends RelationManager
|
||
|
{
|
||
|
protected static string $relationship = 'bidders';
|
||
|
|
||
|
protected static ?string $recordTitleAttribute = 'bidder_num';
|
||
|
|
||
|
public static function form(Form $form): Form
|
||
|
{
|
||
|
return $form
|
||
|
->schema([
|
||
|
Forms\Components\TextInput::make('bidder_num')
|
||
|
->required()
|
||
|
->maxLength(255),
|
||
|
]);
|
||
|
}
|
||
|
|
||
|
public static function table(Table $table): Table
|
||
|
{
|
||
|
return $table
|
||
|
->columns([
|
||
|
Tables\Columns\TextColumn::make('bidder_num'),
|
||
|
])
|
||
|
->filters([
|
||
|
//
|
||
|
])
|
||
|
->headerActions([
|
||
|
Tables\Actions\CreateAction::make(),
|
||
|
])
|
||
|
->actions([
|
||
|
Tables\Actions\EditAction::make(),
|
||
|
Tables\Actions\DeleteAction::make(),
|
||
|
])
|
||
|
->bulkActions([
|
||
|
Tables\Actions\DeleteBulkAction::make(),
|
||
|
]);
|
||
|
}
|
||
|
}
|