C
C
chelkaz2016-10-14 16:15:43
nested set
chelkaz, 2016-10-14 16:15:43

Creating a nested set. What is the initial left and right key?

This package was recommended - https://github.com/lazychaser/laravel-nestedset
I installed it, but when creating a category, I get an error that the fields:
_lft , _rgt and parent_id are not specified. But it's not clear to me what values ​​to assign?
Has anyone come across?
That is, when I just create an entry, it must be root. Just enter zeros?
And when I create a children, what should I specify then?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Mikhail Osher, 2016-10-14
@miraage

Documentation (c) captain

Максим Тимофеев, 2016-10-15
@webinar

Я так понимаю _lft, _rgt и parent_id устанавливает за Вас установленное расширение. И проблема в том, что у Вас они валидируются, а не должны. Это должны быть safe атрибуты.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question