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 checklist_dependency column to docs #444

Merged
merged 1 commit into from
Jun 28, 2023
Merged
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
22 changes: 21 additions & 1 deletion 6.x/crud-columns.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,27 @@ The checklist column will output its connected entity. Used for relationships li
<a name="checklist_dependency"></a>
### checklist_dependency

// TODO
Show connected items selected via checklist_dependency field. It's definition is totally similar to the [checklist_dependency *field type*](/docs/{{version}}/crud-fields#checklist_dependency).

```php
[
'label' => 'User Role Permissions',
'type' => 'checklist_dependency',
'name' => 'roles,permissions',
'subfields' => [
'primary' => [
'name' => 'roles', // the method that defines the relationship in your Model
'entity' => 'roles', // the method that defines the relationship in your Model
'attribute' => 'name', // foreign key attribute that is shown to user
],
'secondary' => [
'name' => 'permissions', // the method that defines the relationship in your Model
'entity' => 'permissions', // the method that defines the relationship in your Model
'attribute' => 'name', // foreign key attribute that is shown to user
],
],
]
```

<hr>

Expand Down