resource setup

This commit is contained in:
2022-09-04 13:57:38 -04:00
parent 8f95e68e61
commit e484c0df98
10 changed files with 66 additions and 9 deletions

View File

@ -22,7 +22,18 @@ class VehicleOwnerRelationManager extends RelationManager
->schema([
Forms\Components\Select::make('bidder_assigned_number')
->label('Number')
->required(),
->required()
->createOptionForm([
Forms\Components\TextInput::make('bidder_fname')->label('First Name'),
Forms\Components\TextInput::make('bidder_lname')->label('Last Name'),
Forms\Components\TextInput::make('bidder_addr')->label('Address'),
Forms\Components\TextInput::make('bidder_city')->label('City'),
Forms\Components\TextInput::make('bidder_state')->label('State'),
Forms\Components\TextInput::make('bidder_zip')->label('Zip'),
Forms\Components\TextInput::make('bidder_phone')->label('Phone Number'),
Forms\Components\TextInput::make('bidder_email')->label('Email'),
Forms\Components\TextInput::make('bidder_assigned_number')->label('Assigned Number'),
]),
]);
}

View File

@ -9,20 +9,26 @@ use Filament\Resources\Table;
use Filament\Tables;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\SoftDeletingScope;
use App\Models\CarShowCategory;
class VehicleTypeRelationManager extends RelationManager
{
protected static string $relationship = 'vehicleType';
protected static ?string $recordTitleAttribute = 'type';
protected static ?string $recordTitleAttribute = 'id';
public static function form(Form $form): Form
{
return $form
->schema([
Forms\Components\TextInput::make('category_name')
Forms\Components\Select::make('category_name')
->required()
->maxLength(255),
->searchable()
->options(CarShowCategory::vehtype()->pluck('category_name', 'id'))
->createOptionForm([
Forms\Components\TextInput::make('category_name'),
Forms\Components\Toggle::make('vehicle_type')->inline(false),
]),
]);
}