Skip to content

Commit 73e202d

Browse files
authored
Update README.md
1 parent b36b42b commit 73e202d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ Filament Tree is a plugin for Filament Admin that creates a model management pag
1010
This plugin creates model management page with heritage tree structure view for Filament Admin. It could be used to create menu, etc.
1111

1212
Demo site : https://filament-cms-website-demo.solutionforest.net/
13+
1314
Demo username : demo@solutionforest.net
15+
1416
Demo password : 12345678
1517
Auto 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

7375
To 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
```
7880
Schema::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
});

0 commit comments

Comments
 (0)