trait ListOperation
{
- use \Backpack\CRUD\app\Http\Controllers\Operations\ListOperation;
+ use \Backpack\CRUD\app\Http\Controllers\Operations\ListOperation {
+ index as baseIndex;
+ }
+
+ protected function index()
+ {
+ $this->getModelInstance()->addWidgets();
+ return $this->baseIndex();
+ }
}
| CrudPanel Configuration
|--------------------------------------------------------------------------
*/
- $this->crud->addColumn(['name' => $model->getPrimaryKey(), 'type' => 'number', 'label' => "#", 'searchLogic' => 'text']);
+ $this->crud->addColumn(['name' => $model->getPrimaryKey(), 'type' => 'number', 'label' => "#", 'thousands_sep' => '', 'searchLogic' => 'text']);
$this->updateFieldsFromModel($model);
}
$res['attributes'] = array_merge($defaults, $res['attributes']);
return $res;
}
+
+ public function getColumnData()
+ {
+ return array_merge(parent::getColumnData(), ['thousands_sep' => '']);
+ }
}
return true;
}
+ public function addWidgets()
+ {
+
+ }
+
}
$values = data_get($entry, $column['name']);
@endphp
-<span>
+<span data-{{$entry->getOption('name')}}-{{$column['name']}}="{{$values}}">
<?php
if ($values !== null) {
if (is_array($values)) {