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 44
55use Illuminate \Database \Connection ;
66use Illuminate \Database \Schema \Blueprint ;
7+ use \Kalnoy \Nestedset \NodeTrait as Node ;
78
89class NestedSet {
910
@@ -15,9 +16,9 @@ class NestedSet {
1516 */
1617 public static function columns (Blueprint $ table , $ primaryKey = 'id ' )
1718 {
18- $ table ->unsignedInteger (Node::LFT );
19- $ table ->unsignedInteger (Node::RGT );
20- $ table ->unsignedInteger (Node::PARENT_ID )->nullable ();
19+ $ table ->unsignedInteger (Node::$ lft );
20+ $ table ->unsignedInteger (Node::$ rgt );
21+ $ table ->unsignedInteger (Node::$ parentId )->nullable ();
2122
2223 $ table ->index (self ::getDefaultColumns ());
2324 }
@@ -42,7 +43,7 @@ public static function dropColumns(Blueprint $table)
4243 */
4344 public static function getDefaultColumns ()
4445 {
45- return [ Node::LFT , Node::RGT , Node::PARENT_ID ];
46+ return [ Node::$ lft , Node::$ rgt , Node::$ parentId ];
4647 }
4748
4849}
You can’t perform that action at this time.
0 commit comments