Search
 
SCRIPT & CODE EXAMPLE
 

HTML

laravel murakkab old

@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 read an input from HTML in javascript 
Html :: doctype html charset utf-8 
Html :: bootstrap display none 
Html :: making rectangle in css 
Html :: ion-searchbar change event 
Html :: html5 audio tag autoplay loop 
Html :: vscode-jest intellisense not working 
Html :: how to show pdf as image in html 
Html :: how to call a function as soon as a page loads javascript 
Html :: create a table in html with 3 rows and 4 columns 
Html :: twig captitalize 
Html :: bootstrap colors 
Html :: html load page at certain point 
Html :: Multibyte string input conversion in PHP is active and must be disabled 
Html :: how to set domain name on localhost linux ubuntu xampp 
Html :: html iframe tag 
Html :: html table line between rows 
Html :: bootstrap input file 
Html :: coc allow comments in json 
Html :: javascript onclick back 
Html :: how to make a link in html 
Html :: getproductpricehtml magento 2 
Html :: select empty option 
Html :: bootstrap link 
Html :: react render string as html 
Html :: bootstrap dropdown on hover 
Html :: call year in html 
Html :: corner radius edittext android 
Html :: yii2 csrf custom form 
Html :: bootstrap 3 form template 
ADD CONTENT
Topic
Content
Source link
Name
3+8 =