ClosureTable
ClosureTable copied to clipboard
Readme example doesnt work in 6.1.1
Result for the default structure: parent_id null for all rows ! I tried laravel 6 & 8 and diff Clousure table version, its all same problem
only createFromArray works fine, which gives parent_id
nodes
node_closure
I think this is due to Laravel 8 moving all the app models into models subdirectory
You can add fillable in your node model to allow insert column parent_id
for example :
protected $fillable = [ 'position', 'parent_id' ];
Or you can use my PR : #257