Answer the question
In order to leave comments, you need to log in
Nested with in laravel?
There is a table of tags, tags are nested in each other.
The tags, and tag_tag tables.
You need to get a nested tag tree.
I write like this: $tags = Tag::with('tags')->get();
Now I display recursively the name of the tag and its child tags. I access child tags via $tag->tags
The fact is that nesting can be large, and the selection code selects child tags only for the first level.
For example:
Tag-1
Tag-2
Tag-3
Answer the question
In order to leave comments, you need to log in
By standard means - is not present.
But in the open spaces I came across this package. May help you
https://github.com/lazychaser/laravel-nestedset
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question