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

I didn't set the model for this table. But i would like to know how to process it in the view. Do I have to create a model for it to maintain it?

how will it looks like

here is the structure of table

Categories
    id 
    parent_category
    title

and the end result would be like this

<ul>
   <li>ACME Products Inc.</li>
   <ul class=”children”>
       <li>Acme Accounting Solutions</li>
       <li>Acme Reseach & Development
   <ul>
   <li>Acme Prototypes Limited</li>
</ul>

Last updated 3 years ago.
0

you dont have to create a model but then you would need to create queries yourself.. in controller to get the required data..

0

ok show the proper way to query and load it on view

0

Sign in to participate in this thread!

Eventy

Your banner here too?

infacq infacq Joined 14 Apr 2015

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.