The aim of this plugin is to study the possible support of tree display for relation form fields.
The model associated with the field must use the Winter\Storm\Database\Traits\NestedTree trait.
Let assume you're in the root of your wintercms installation
Just run this command
composer require hounddd/wn-enhancedrelation-pluginClone this repo into your winter plugins folder.
cd plugins
mkdir hounddd && cd hounddd
git clone https://github.com/Hounddd/wn-enhancedrelation-plugin enhancedrelationNote: In both cases, run
php artisan migratecommand to run plugin's migrations
Replace the type relation with enhanced-relation in your form field definition.
categories:
label: 'Categories'
nameFrom: name
# type: relation
type: enhanced-relation
quickselect: true
displayTree: true
quickTreeActions: true
displayTree: Display the tree structure of the relation.quickTreeActions: Display buttons on the top of the widget to open all, closse all or open only selected nodes.
