File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,13 @@ $this->crud->addColumn($column_definition_array);
5151// add multiple columns, at the end of the stack
5252$this->crud->addColumns([$column_definition_array, $another_column_definition_array]);
5353
54+ // to change the same attribute across multiple columns you can wrap them in a `group`
55+ // this will add the '$' prefix to both columns
56+ CRUD::group(
57+ CRUD::column('price'),
58+ CRUD::column('discount')
59+ )->prefix('$');
60+
5461// remove a column from the stack
5562$this->crud->removeColumn('column_name');
5663
Original file line number Diff line number Diff line change @@ -34,6 +34,13 @@ CRUD::field([
3434// to change an attribute on a field, you can target it at any point
3535CRUD::field('price')->prefix('$');
3636
37+ // to change the same attribute across multiple fields you can wrap them in a `group`
38+ // this will add the '$' prefix to both fields
39+ CRUD::group(
40+ CRUD::field('price'),
41+ CRUD::field('discount')
42+ )->prefix('$');
43+
3744// to move fields before or after other fields
3845CRUD::field('price')->before('name');
3946CRUD::field('price')->after('name');
You can’t perform that action at this time.
0 commit comments