I have data that I need to display in 3 rows with header in Laravel blade view.I know there is chunk method in Laravel to chunk the data and display.But I want to diplay data in different way.
Here is my data
Illuminate\Support\Collection {#1898 ▼
#items: array:2 [▼
0 => {#1021 ▼
+"parameter": "NH3 Examine"
+"id": 6
+"pond_quality_id": 5
+"parameter_id": 28
+"pond_water_cig": 12
+"pond_water_non_cig": 12
+"taken_actions_cig": 12
+"taken_actions_non_cig": 12
+"taken_actions": "action"
+"measure_before_intervention": "before"
+"measure_after_intervention": "after"
+"remarks": "remarks1"
+"created_at": "2021-04-25 10:16:00"
+"updated_at": "2021-04-25 10:16:00"
}
1 => {#1897 ▼
+"parameter": "O2 Examine"
+"id": 7
+"pond_quality_id": 5
+"parameter_id": 29
+"pond_water_cig": 23
+"pond_water_non_cig": 23
+"taken_actions_cig": 23
+"taken_actions_non_cig": 23
+"taken_actions": "action taken"
+"measure_before_intervention": "before intervention"
+"measure_after_intervention": "after intervention"
+"remarks": "remarks2"
+"created_at": "2021-04-25 10:16:00"
+"updated_at": "2021-04-25 10:16:00"
}
]
}
Here is how I want to output my data
col1 | col2 | col3 | col4 |
---|---|---|---|
col1 val1 | col2 val1 | col3 val3 | col4 val4 |
col1 val2 | col2 val2 | col3 val3 | col4 val4 |
col5 | col6 | col7 | col8 |
---|---|---|---|
col5 val1 | col6 val1 | col7 val3 | col8 val4 |
col5 val2 | col6 val2 | col7 val3 | col8 val4 |
col9 |
---|
col9 val1 |
col9 val2 |
How can I achieve this?