V
V
Vladimir Borisyuk2020-05-30 00:48:58
Laravel
Vladimir Borisyuk, 2020-05-30 00:48:58

How to properly implement CNC with multi-nested categories?

The task is to implement a blog in which categories can be multi-level, while the url should be of the form:
Site.com/blog/rootCat/subCat1/.../catN/post_slug.
Also, each post must contain a full link to its category.
It is clear that the last element is the slug of the post. How to get a competent tree from a child to parents to build a link to a category?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin B., 2020-05-30
@Flight404

Nestedset must be used. Checked, in 90% of projects it is enough, and given that there are a huge number of ready-made solutions for Laravel, you don’t even need to write anything

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question