PHP code example of norgeit / nova-nested-tree-attach-many
1. Go to this page and download the library: Download norgeit/nova-nested-tree-attach-many library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
norgeit / nova-nested-tree-attach-many example snippets
use PhoenixLib\NestedTreeAttachMany\NestedTreeAttachManyField;
public function fields(Request $request)
{
return [
NestedTreeAttachManyField::make('Offer Categories',"categories","App\Nova\Category"),
];
}
class Category extends Model
{
use NodeTrait;
}
->rules('min:5', 'max:10', 'size:10', '