Support the ongoing development of Laravel.io →
Database Eloquent Views

Hi all,

I have a small issue I can't figure out.

I want to be able to get all categories that will display the parent categories (parent_id) in the navbar then in each sub-category show the corresponding child items in a dropdown menu.

I'm using Bootstrap 3 for the frontend.

My database looks like:- http://cl.ly/image/300A210L292z

So my question is what should i do within my controller and view files to be able to create this.

Needs to work like this on eBay - http://cl.ly/image/3G0J3S370R3F

Thanks in advance.

Last updated 3 years ago.
0

Anyone had this shame problem and how did you do it?

Last updated 3 years ago.
0

Sign in to participate in this thread!

PHPverse

Your banner here too?

lstables lstables Joined 5 Jan 2014

Moderators

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

Your logo here?

Laravel.io

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

© 2025 Laravel.io - All rights reserved.