Skip to content

Commit

Permalink
add group docs
Browse files Browse the repository at this point in the history
  • Loading branch information
pxpm committed Jul 22, 2024
1 parent 3f7538a commit c1833d7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions 6.x/crud-columns.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ $this->crud->addColumn($column_definition_array);
// add multiple columns, at the end of the stack
$this->crud->addColumns([$column_definition_array, $another_column_definition_array]);

// to change the same attribute across multiple columns you can wrap them in a `group`
// this will add the '$' prefix to both columns
CRUD::group(
CRUD::column('price'),
CRUD::column('discount')
)->prefix('$');

// remove a column from the stack
$this->crud->removeColumn('column_name');

Expand Down
7 changes: 7 additions & 0 deletions 6.x/crud-fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ CRUD::field([
// to change an attribute on a field, you can target it at any point
CRUD::field('price')->prefix('$');

// to change the same attribute across multiple fields you can wrap them in a `group`
// this will add the '$' prefix to both fields
CRUD::group(
CRUD::field('price'),
CRUD::field('discount')
)->prefix('$');

// to move fields before or after other fields
CRUD::field('price')->before('name');
CRUD::field('price')->after('name');
Expand Down

0 comments on commit c1833d7

Please sign in to comment.