use Cubist\Backpack\app\Magic\Controllers\CubistMagicController;
use Cubist\Backpack\app\Template\TemplateAbstract;
+use Cubist\Util\Json;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\DBAL\Schema\Table;
use Illuminate\Support\Facades\DB;
{
return parent::addFakes($columns);
}
+
+ protected function _prepareData($attributes)
+ {
+ return Json::decodeRecursive(parent::_prepareData($attributes), Json::TYPE_ARRAY);
+ }
}
protected function _prepareData($attributes)
{
- return Json::decodeRecursive($attributes, Json::TYPE_ARRAY);
+ return $attributes;
}
public function update(array $attributes = [], array $options = [])
if (is_string($value)) {
$value = json_decode($value, true);
}
+if(is_object($value)){
+ $value=Cubist\Util\ArrayUtil::asArray($value);
+}
if (!isset($value['first'])) {
$value['first'] = '';
$value['second'] = '';
}
-
?>
<div @include('crud::inc.field_wrapper_attributes') >
<label>{!! $field['label'] !!}</label>