Tuesday, May 23, 2017

I won't get value in array or object in laravel

I already get data like this Using laravel query builder

[0]
    Category_id:1,
    product:food
[1]
    Category_id=1
    product:fish
[2]
   Category_id=1
   product:vegetable

But I want this formate

category_id 1{
          product
                { "Food","Fish","Vegetable"}

}



via Shahnaouz Razu Sharif

Advertisement