File: D:/HostingSpaces/SBogers10/umans.komma.pro/workbench/komma/kms/src/views/attributes/onOff.blade.php
<div class="entity-attribute entity-attribute-on-off{{{ count($attribute->errors) == 0 ? '' : ' error' }}} {{{$attribute->class}}}" data-uk-tooltip="{pos:'bottom-right'}" title="{{{ $attribute->errors[0] or '' }}}">
{{ Form::label($attribute->key. '_checkbox', $attribute->label) }}
{{ Form::hidden($attribute->key, $attribute->getValue(), ['id' => $attribute->key]) }}
{{ Form::checkbox($attribute->key.'_checkbox', '1', $attribute->getValue() == 1 ? true : false, ['class' => 'toggle toggle-round-flat', 'id' => $attribute->key . '_checkbox']) }}
<label for="{{{$attribute->key . '_checkbox'}}}" class="toggle-label"></label>
<script>
$("#{{$attribute->key}}_checkbox").change(function(){
$("#{{$attribute->key}}").val($(this).prop('checked') ? 1 : 0);
});
</script>
</div>