category relationship

This commit is contained in:
Russ Long 2022-08-06 19:19:33 -04:00
parent b6ff1755ad
commit fde7c758d7
2 changed files with 3 additions and 4 deletions

View File

@ -18,7 +18,6 @@ use Filament\Tables\Columns\TextColumn;
use Filament\Forms\Components\TextInput; use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\Toggle; use Filament\Forms\Components\Toggle;
class CarShowCategoryResource extends Resource class CarShowCategoryResource extends Resource
{ {
protected static ?string $model = CarShowCategory::class; protected static ?string $model = CarShowCategory::class;

View File

@ -14,13 +14,13 @@ class VehicleRelationManager extends RelationManager
{ {
protected static string $relationship = 'vehicle'; protected static string $relationship = 'vehicle';
protected static ?string $recordTitleAttribute = 'type'; protected static ?string $recordTitleAttribute = 'id';
public static function form(Form $form): Form public static function form(Form $form): Form
{ {
return $form return $form
->schema([ ->schema([
Forms\Components\TextInput::make('type') Forms\Components\TextInput::make('id')
->required() ->required()
->maxLength(255), ->maxLength(255),
]); ]);
@ -30,7 +30,7 @@ class VehicleRelationManager extends RelationManager
{ {
return $table return $table
->columns([ ->columns([
Tables\Columns\TextColumn::make('type'), Tables\Columns\TextColumn::make('id'),
Tables\Columns\TextColumn::make('owner'), Tables\Columns\TextColumn::make('owner'),
Tables\Columns\TextColumn::make('year'), Tables\Columns\TextColumn::make('year'),
Tables\Columns\TextColumn::make('make'), Tables\Columns\TextColumn::make('make'),