I am taking data from a junction table and want to chunk by id but the method is not recognized. Here is my code:
$dataSet = DB::table('datapoint')
->join('datapoint_has_variable', 'datapoint_has_variable.datapointId', '=', 'datapoint.id')
->select('datapoint_has_variable.variableId','datapoint_has_variable.datapointId','datapoint_has_variable.value')
->where('datapoint.sheetId', $sheet->id)
->get();
$dataSet->chunkById('datapointId');
This returns BadMethodCallException - Method chunkById does not exist.
What am I doing wrong?
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community