Here i'm returning data from my database which have a title_heading column and it has a title column.
id title_heading title
1 HTML Tutorial Home
2 HTML Tutorial Overview
3 HTML References Tags
4 HTML References Events
but now i wanted to show the results like this in my view:
**HTML Tutorial**
Home
Overview
**HTML References**
Tags
Events
If anyone have any idea please let me know... Thank You!
i have two idea on this.. first normalize that table into two table..
heading : [id,name] subTitle : [id, name, heading_id]
then you make oneToMany Relationship in laravel
https://laravel.com/docs/5.7/eloquent-relationships#one-to-many
second you can use nested loop it and push it into array..