schema([ Forms\Components\Select::make('gateway.name') ->label('Gateway') ->relationship('gateway', 'name') ->searchable() ->preload() ->placeholder('Select the gateway'), Forms\Components\TextInput::make('transaction_id') ->label('Transaction ID'), Forms\Components\TextInput::make('amount') ->label('Amount') ->numeric() ->mask(RawJs::make( <<<'JS' $money($input, '.', '', 2) JS )) ->required(), Forms\Components\TextInput::make('fee') ->numeric() ->mask(RawJs::make( <<<'JS' $money($input, '.', '', 2) JS )) ->label('Fee'), ]); } public function table(Table $table): Table { return $table ->recordTitleAttribute('transaction_id') ->columns([ Tables\Columns\TextColumn::make('gateway.name')->label('Gateway'), Tables\Columns\TextColumn::make('transaction_id'), Tables\Columns\TextColumn::make('formattedAmount')->label('Amount'), Tables\Columns\TextColumn::make('formattedFee')->label('Fee'), Tables\Columns\TextColumn::make('created_at'), ]) ->filters([ // ]) ->headerActions([ Tables\Actions\CreateAction::make(), ]) ->actions([ Tables\Actions\DeleteAction::make(), ]) ->bulkActions([ Tables\Actions\BulkActionGroup::make([ Tables\Actions\DeleteBulkAction::make(), ]), ]); } }