silent-auction/app/Filament/Resources/VehiclesResource/RelationManagers/VehicleOwnerRelationManager.php

52 lines
1.5 KiB
PHP
Raw Normal View History

2022-08-07 12:48:05 -04:00
<?php
namespace App\Filament\Resources\VehiclesResource\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 VehicleOwnerRelationManager extends RelationManager
{
protected static string $relationship = 'vehicleOwner';
protected static ?string $recordTitleAttribute = 'owner';
public static function form(Form $form): Form
{
return $form
->schema([
2022-08-28 15:29:40 -04:00
Forms\Components\Select::make('bidder_assigned_number')
->label('number')
2022-08-28 15:30:40 -04:00
->required(),
2022-08-07 12:48:05 -04:00
]);
}
public static function table(Table $table): Table
{
return $table
->columns([
2022-08-28 15:16:50 -04:00
Tables\Columns\TextColumn::make('bidder_fname')->label('First Name'),
Tables\Columns\TextColumn::make('bidder_lname')->label('Last Name'),
Tables\Columns\TextColumn::make('bidder_assigned_number')->label('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(),
]);
}
}