Skip to content

Commit 20a6218

Browse files
authored
Merge pull request #588 from Laravel-Backpack/add-group-docs
add group docs
2 parents 3f7538a + c1833d7 commit 20a6218

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

6.x/crud-columns.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff 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

6.x/crud-fields.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ CRUD::field([
3434
// to change an attribute on a field, you can target it at any point
3535
CRUD::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
3845
CRUD::field('price')->before('name');
3946
CRUD::field('price')->after('name');

0 commit comments

Comments
 (0)