kamav
Multiple Repeater
->schema([
Section::make('Payment') ->schema([ Repeater::make('payments') ->relationship('paymentTransactions') ->schema([
TextInput::make('amount') ->numeric() ->label('Amount') ->required()->default(1), Select::make('currency') ->label('Currency') ->options([ 'USD' => 'USD', 'EUR' => 'EUR', 'GBP' => 'GBP', 'TRY' => 'TRY', 'JPY' => 'JPY', 'AUD' => 'AUD', ])
->required(),
]) ->addActionLabel('Add Payment') ->columns(3) ->defaultItems(1),
]), Select::make('status') ->options([ 'pending' => 'Pending', 'completed' => 'Completed', 'failed' => 'Failed', ]) ->default('pending') ->required(), ]); Actually when i use it in PaymentResource page it works, but in TransactionResource page it only works when i provide the payment-id manually. The problem is I can’t see the array sent by “payment” .
Section::make('Payment') ->schema([ Repeater::make('payments') ->relationship('paymentTransactions') ->schema([
TextInput::make('amount') ->numeric() ->label('Amount') ->required()->default(1), Select::make('currency') ->label('Currency') ->options([ 'USD' => 'USD', 'EUR' => 'EUR', 'GBP' => 'GBP', 'TRY' => 'TRY', 'JPY' => 'JPY', 'AUD' => 'AUD', ])
->required(),
]) ->addActionLabel('Add Payment') ->columns(3) ->defaultItems(1),
]), Select::make('status') ->options([ 'pending' => 'Pending', 'completed' => 'Completed', 'failed' => 'Failed', ]) ->default('pending') ->required(), ]); Actually when i use it in PaymentResource page it works, but in TransactionResource page it only works when i provide the payment-id manually. The problem is I can’t see the array sent by “payment” .
8 replies