I have select tag in my page, and the options comes from the database.  

When I run JS code, I recieve the new array which I need to pass except the old one (in new array I recieve new options)

```html
<select name="category_id" class="form-control custom-select" id="variant_colour">
<option selected>Select variant...</option>
    @foreach($attributes_colour_selected as $variant)
        <option value="">{{$variant->attributes_colour}}</option>
    @endforeach
</select>
```

```html
<script>
  $('#variant_model').change(function(){
    var value = $('select#variant_model').val();
    $.ajaxSetup({
    headers: {
    'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
    }
    });
    $.ajax({
      type:"POST",
      url: "showVariantModel",
      data: {value:value},
      success: function(data){
      var attr = 'I don't know what to pass here';

      $('#variant_colour:last').append(attr);

      }
    })

  });
</script> 
```

Can you suggest the simpliest way to change foreach arguments.
New variable comes from Controller. 
When I write the string like this:

```html
<script>
var attr = '@foreach($attributes_colour_selected as $variant)'+
          'blablabla'+
          '@endforeach';
</script>
```

Nothing works...