This question has been asked many times before. But none of them helped me solve the problem.
This is the query I wrote:
$this->data['model'] = OrderDetail::with('product')->groupBy(['service_id',function($q){
return Carbon::parse($q->created_at)->format('Y');
}]);
$this->data['data'] = $this->data['model']->paginate(request()->get('limit', $this->data['limit']))->appends(request()->all());
When I perform Paginate operation, I encounter such an error
it gives the same error when I do dd($this->data)
