File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,9 @@ Filament Tree is a plugin for Filament Admin that creates a model management pag
1010This plugin creates model management page with heritage tree structure view for Filament Admin. It could be used to create menu, etc.
1111
1212Demo site : https://filament-cms-website-demo.solutionforest.net/
13+
1314Demo username : demo@solutionforest.net
15+
1416Demo password : 12345678
1517Auto Reset every hour.
1618
@@ -41,7 +43,7 @@ return [
4143 'column_name' => [
4244 'order' => 'order',
4345 'parent' => 'parent_id',
44- 'depth ' => 'depth ',
46+ 'title ' => 'title ',
4547 ],
4648 /**
4749 * Tree model default parent key
@@ -72,14 +74,13 @@ Next, prepare the database and model.
7274
7375To use Filament Tree, follow these table structure conventions:
7476
75- > ** Tip: The ` parent_id ` field must always default to 0 !!!**
77+ > ** Tip: The ` parent_id ` field must always default to -1 !!!**
7678
7779```
7880Schema::create('product_categories', function (Blueprint $table) {
7981 $table->id();
80- $table->integer('parent_id')->default(0 );
82+ $table->integer('parent_id')->default(-1 );
8183 $table->integer('order')->default(0)->index();
82- $table->tinyInteger('depth')->default(1)->index();
8384 $table->string('title');
8485 $table->timestamps();
8586 });
You can’t perform that action at this time.
0 commit comments