{!! Form::open(['role' => 'form', 'class' => 'form-horizontal form-groups', 'id' => 'mfnMraProductMappingForm']) !!}
{!! Form::label('effectiveDate', 'Effective Date:', ['class' => 'col-sm-1 control-label', 'style' => 'color: black;']) !!}
{!! Form::text('effectiveDate', null, ['class' => 'form-control datepicker', 'id' => 'effectiveDate', 'type' => 'text', 'readonly']) !!}

{!! Form::label('Select / Unselect All', null, ['style' => 'color: black; font-weight: bold;']) !!}   {!! Form::checkbox('checkAll', null, false, ['class' => 'checkAll']) !!}      



@foreach ($branches as $branche)
@if(in_array($branche->id, ($allSelectedProducts ?? []) ) ) @if(in_array($branche->id, ($mfnMraProductMappingExist ?? []) ) ) {{ Form::checkbox('branchIds[]', $branche->id, true, array('class'=>'isSelected')) }} @else {{ Form::checkbox('branchIds[]', $branche->id, true, array('class'=>'isSelected')) }} @endif @else @if(in_array($branche->id, ($mfnMraProductMappingExist ?? []) ) ) {{ Form::checkbox('branchIds[]', $branche->id, true, array('class'=>'isSelected')) }} @else {{ Form::checkbox('branchIds[]', $branche->id, null, array('class'=>'isSelected')) }} @endif @endif
@endforeach
{!! Form::label('submit', ' ', ['class' => 'col-sm-5 control-label']) !!}
{!! Form::submit('Save', ['id' => 'mfnMraProductMappingFormSubmit', 'class' => 'btn btn-success']) !!} Close
{!! Form::close() !!}