protected $_viewNamespace = CubistBackpackServiceProvider::NAMESPACE . '::fields';
protected $_databaseType = 'string';
- protected $_columnType = 'string';
+ protected $_columnType = 'color';
+ protected $_columnViewNamespace=CubistBackpackServiceProvider::NAMESPACE . '::columns';
protected $_allowsAlpha = true;
protected $_allowsEmpty = false;
--- /dev/null
+{{-- regular object attribute --}}
+@php
+ $value = data_get($entry, $column['name']);
+
+@endphp
+
+<span>
+ @includeWhen(!empty($column['wrapper']), 'crud::columns.inc.wrapper_start')
+ <span
+ style="height: 25px;width:25px;background-color:{{$value}};display: inline-block;border-radius: 5px;margin-right: 5px;vertical-align: middle;position:relative;top:-2px;"></span> {{$value}}
+ @includeWhen(!empty($column['wrapper']), 'crud::columns.inc.wrapper_end')
+</span>