We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3875123 + 2c9f94d commit 909adcaCopy full SHA for 909adca
src/DataTableAbstract.php
@@ -248,13 +248,21 @@ public function escapeColumns($columns = '*')
248
249
/**
250
* Set columns that should not be escaped.
251
+ * Optionally merge the defaults from config.
252
*
253
* @param array $columns
254
+ * @param bool $merge
255
* @return $this
256
*/
- public function rawColumns(array $columns)
257
+ public function rawColumns(array $columns, $merge = false)
258
{
- $this->columnDef['raw'] = $columns;
259
+ if ($merge) {
260
+ $config = $this->config->get('datatables.columns');
261
+
262
+ $this->columnDef['raw'] = array_merge($config['raw'], $columns);
263
+ } else {
264
+ $this->columnDef['raw'] = $columns;
265
+ }
266
267
return $this;
268
}
0 commit comments