Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add group docs #588

Merged
merged 1 commit into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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