<td>
<select class="form-control" name="type_id" placeholder="Type" id="transactionType">
@foreach ($transactionTypes as $transactionType)
<option value="{{ $transactionType->id }}">{{ $transactionType->name }}</option>
@endforeach
</select>
</td>
<td>
<select id="treeviewSelect" class="form-select text-end" name="account_to">
@foreach($categories as $category)
<optgroup label="{{ $category->name_ar }}">
@foreach($category->children as $subcategory)
<optgroup label="{{ $subcategory->name_ar }}">
@foreach($subcategory->accounts as $account)
<option value="{{ $account->id }}">{{ $account->name_ar }}</option>
@endforeach
</optgroup>
@endforeach
@foreach($category->accounts as $account)
<option value="{{ $account->id }}">{{ $account->name_ar }}</option>
@endforeach
</optgroup>
@endforeach
</select>
</td>