I am processing in laravel.
$product = Product::selectRaw('name')->groupBy('name')->get();
return response()->json($product);
Result :
(69) [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, __ob__: Observer]
0: {__ob__: Observer}
1: {__ob__: Observer}
2: {__ob__: Observer}
3: {__ob__: Observer}
4: {__ob__: Observer}
5: {__ob__: Observer}
Now i want it like this:
item: Array(69)
[0 … 69]
0: {…}
1: {…}
2: {…}
3: {…}
Give me an idea..Thanks
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3BVCBak
via IFTTT
Aucun commentaire:
Enregistrer un commentaire