HopesAreMiracle
1 year ago

How to use old method for populate old value that have 2 values in option value?

Posted 1 year ago by HopesAreMiracle

How to use old method for populate old value that have 2 values in option value? Previously i can use old method when i have 1 value in option value . Like this

-- Choose Float Account -- @foreach($walletname as $walletnames) <option value="{{ $walletnames->wallet_name }}" @if(old('to_bank_name') == $walletnames->wallet_name) {{ 'selected' }} @endif> {{ $walletnames->wallet_name}} ( $ {{ $walletnames ->currencies['name'] }} ) @endforeach

But when i use 2 value in option value for explode of purpose , i cannot use old method anymore.

-- Choose Float Account -- @foreach($walletname as $walletnames) <option value="{{ $walletnames->wallet_name }}|{{ $walletnames->currencies['id'] }}" @if(old('from_bank_name') == $walletnames->wallet_name|$walletnames->currencies['id'])) selected @endif >{{ $walletnames['wallet_name'] }} ( $ {{ $walletnames ->currencies['name'] }} ) @endforeach

Thanks you all. Peace . My head is almost burning. Thanks for the help.

Please sign in or create an account to participate in this conversation.