Search
 
SCRIPT & CODE EXAMPLE
 

HTML

laravel murakkab old request

@foreach(old('product_attribute') ?? [] as $key => $attribute_old)
<tr id="attribute-row{{ $key }}">
  <td class="text-left" style="width: 20%;">
    <select name="product_attribute[{{ $key }}][attribute_id]" class="form-select" required>
      @foreach($attributes as $attribute)
      <optgroup label="{{$attribute['name'] }}">
        @foreach($attribute['values'] as $value)
        <option value="{{$value['id'] }}" name="product_attribute[{{ $key }}][id]"
        {{ old('product_attribute.'.$key.'.attribute_id') == $value['id'] ? 'selected' : '' }}>{{ $value['name']  }}</option>
        @endforeach
      </optgroup>
      @endforeach
    </select>
  </td>
  <td class="text-left">
    @foreach($langs as $lang)
    <div class="input-group">
      <span class="input-group-text">
      {!!  $lang['img'] !!}
      </span>
      <input name="product_attribute[{{ $key }}][text][{{ $lang['code']}}]" placeholder="Текст" class="form-control" required
        value="{{ old('product_attribute.'.$key.'.text.'.$lang['code'], '') }}">
    </div>
    @endforeach
  </td>
  <td class="align-middle">
    <button type="button" onclick="$('#attribute-row{{ $key }}').remove();" title="Удалить" class="btn btn-danger"><i class="bx bx-minus-circle"></i></button>
  </td>
</tr>
@endforeach
Comment

PREVIOUS NEXT
Code Example
Html :: how to get value of textbox in javascript from html 
Html :: vue router link dynamic id 
Html :: how to hide display in bootstrap 
Html :: tailwind css link 
Html :: opening email on clicking email link 
Html :: bootstrap large text clip 
Html :: buttons in video tag html 
Html :: load pdf html 
Html :: emmet unordered list 
Html :: How do you require 8-digit password in an input 
Html :: center unordered list html 
Html :: bootstrap text warning color 
Html :: Hoow to open a css property in css 
Html :: ng build index html not working 
Html :: turn of blur html canvas 
Html :: how to set a default value for a dropdownlist in html with thymeleaf spring 
Html :: see line from table html 
Html :: facebook seo meta tags 
Html :: am pm time html javascript 
Html :: HTML5 Option Groups 
Html :: number dropdown html 
Html :: html href to gmail 
Html :: how to define tag icon in html 
Html :: html type file extension 
Html :: do you like grepper 
Html :: how can we open file manager by html 
Html :: express send html file 
Html :: bootstrap modal popup backdrop false 
Html :: prevent image saving in html 
Html :: tailwind download button 
ADD CONTENT
Topic
Content
Source link
Name
2+6 =