ClosureTable icon indicating copy to clipboard operation
ClosureTable copied to clipboard

Readme example doesnt work in 6.1.1

Open sooxt98 opened this issue 4 years ago • 2 comments

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

image

nodes

image

node_closure

image

sooxt98 avatar Feb 21 '21 18:02 sooxt98

I think this is due to Laravel 8 moving all the app models into models subdirectory

sooxt98 avatar Feb 21 '21 18:02 sooxt98

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

penerbangkode avatar Aug 19 '23 17:08 penerbangkode