Skip to content

Commit 95f9ca4

Browse files
author
phoenix
committed
fix -- update readme.md
1 parent d5fc9a9 commit 95f9ca4

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

readme.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,32 @@ Here are a few customization options
6666
- `->useSingleSelect()` // - ability for select only one value
6767
- `->useAsField()` // - ability to write result to field without relations
6868

69+
### Example of use with package whitecube/nova-flexible-content
70+
71+
```php
72+
use Whitecube\NovaFlexibleContent\Flexible;
73+
use PhoenixLib\NovaNestedTreeAttachMany\NestedTreeAttachManyField;
74+
75+
/**
76+
* Get the fields displayed by the resource.
77+
*
78+
* @param \Illuminate\Http\Request $request
79+
* @return array
80+
*/
81+
public function fields(Request $request)
82+
{
83+
return [
84+
// ...
85+
86+
Flexible::make('Content')
87+
->addLayout('Simple content section', 'tree_section', [
88+
NestedTreeAttachManyField::make('Tree',"tree","App\Nova\Category")
89+
->useAsField(),
90+
])
91+
];
92+
}
93+
```
94+
6995

7096
### Authorization
7197
This field also respects policies: ie Role / Permission

0 commit comments

Comments
 (0)