Answer the question
In order to leave comments, you need to log in
How to set up routes like in Wordpress?
I am migrating a site from WP to Laravel (DB), the main task is to save all the paths for posts and categories. All categories and posts do not have any "anchor", such as: project.com/categories/{category-name}
or project.com/posts/{post-name}
.
In this project, all categories have the form: project.com/{category-name}
, and posts: project.com/{post-name}
.
How is the controller written in general so that categories and posts can be pulled out of the database by slug, moreover, for this to work and provided that there can be a category and a post with the same slug?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question