Support the ongoing development of →
Database Eloquent Laravel
Last updated 1 year ago.

hi. this structure is wrong. because if you got a three layers of category you have to add another table. for that your table category table structure must be like this:

id parent_id title

which parent_id is a foreign key refers to the categories table itself. and of course parent_id is nullable.

xudong7930 liked this reply


Sign in to participate in this thread!


Your banner here too?


We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 - All rights reserved.