Issue #1253
This commit is contained in:
parent
763a380870
commit
063a58b753
|
|
@ -1,10 +1,19 @@
|
|||
@inject ('productFlatRepository', 'Webkul\Product\Repositories\ProductFlatRepository')
|
||||
|
||||
<?php
|
||||
$productChannels = $productFlatRepository->findWhere([
|
||||
'product_id' => $product->id
|
||||
])->pluck('channel')->unique()->toArray();
|
||||
?>
|
||||
|
||||
<accordian :title="'{{ __('admin::app.catalog.products.channel') }}'" :active="true">
|
||||
<div slot="body">
|
||||
<div class="control-group" :class="[errors.has('channels[]') ? 'has-error' : '']">
|
||||
<label for="channels" class="required">{{ __('admin::app.catalog.products.channel') }}</label>
|
||||
|
||||
<select class="control" name="channels[]" v-validate="'required'" data-vv-as=""{{ __('admin::app.catalog.products.channel') }}"" multiple>
|
||||
@foreach (app('Webkul\Core\Repositories\ChannelRepository')->all() as $channel)
|
||||
<option value="{{ $channel->id }}">
|
||||
<option value="{{ $channel->id }}" {{ in_array($channel->code, $productChannels) ? 'selected' : ''}}>
|
||||
{{ $channel->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
|
|
|
|||
Loading…
Reference in New Issue