components([ Forms\Components\TextInput::make('username') ->required() ->maxLength(255), ]); } public function table(Table $table): Table { return $table ->recordTitleAttribute('username') ->columns([ Tables\Columns\TextColumn::make('username'), Tables\Columns\TextColumn::make('email'), Tables\Columns\TextColumn::make('pivot.status') ->label('Status') ->badge() ->color(fn (string $state): string => match ($state) { 'completed' => 'success', 'in_progress' => 'warning', 'registered' => 'info', default => 'gray', }), Tables\Columns\TextColumn::make('pivot.created_at') ->label('Joined At') ->dateTime(), ]) ->filters([ // ]) ->headerActions([ // Usually participants join via app, but maybe allow manual attach? // Tables\Actions\AttachAction::make(), ]) ->actions([ DetachAction::make(), ]) ->bulkActions([ BulkActionGroup::make([ DetachBulkAction::make(), ]), ]); } }