File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff 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
7197This field also respects policies: ie Role / Permission
You can’t perform that action at this time.
0 commit comments