vendredi 11 juin 2021

Multiple array in yaijra datatable

array:4 [▼

0 => Illuminate\Database\Eloquent\Collection {#1745 ▼

    #items: array:1 [▼

         0 => App\ServiceOrder {#1736 ▶}

     ]


1 => Illuminate\Database\Eloquent\Collection {#1748 ▼

        #items: []

 }

2 => Illuminate\Database\Eloquent\Collection {#1746 ▼

        #items: []

}

3 => Illuminate\Database\Eloquent\Collection {#1752 ▼

        #items: []

}
]

when i query i got this type of code format. but i cannot get view this in my blade file. i am using yaijra datable package and i can view if i got only one array but here i got double array. i am confused how to solved it.

return Datatables::of($test)

              ->addColumn('service', function ($row) {

                    $service = $row->service);

                  return $service;

              })

            ->addColumn(

                'action',

                function ($row) {

                html.="..."
                })

                ->rawColumns(['service', 'action'])

              ->make(true);

        }


from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3we2qyR
via IFTTT

Aucun commentaire:

Enregistrer un commentaire