diff --git a/src/Http/Resources/ConsultationTermsResource.php b/src/Http/Resources/ConsultationTermsResource.php index eef17eb..96d3d84 100644 --- a/src/Http/Resources/ConsultationTermsResource.php +++ b/src/Http/Resources/ConsultationTermsResource.php @@ -96,7 +96,7 @@ public function toArray($request) $this->consultation->getDuration() ), 'busy_terms' => ConsultationTermResource::collection($consultationServiceContract->getBusyTermsFormatDate($this->consultation->getKey())), - 'author' => $this->consultation->author ? ConsultationAuthorResource::make( $this->consultation->author) : null, + 'author' => $this->consultation->author ? ConsultationAuthorResource::make($this->consultation->author) : null, ]; return self::apply($fields, $this); } diff --git a/src/Services/ConsultationService.php b/src/Services/ConsultationService.php index 661c9e8..c69a2c4 100644 --- a/src/Services/ConsultationService.php +++ b/src/Services/ConsultationService.php @@ -266,10 +266,7 @@ public function forCurrentUserResponse(ListConsultationsRequest $listConsultatio { $search = $listConsultationsRequest->except(['limit', 'skip', 'order', 'order_by']); $consultations = $this->getConsultationsListForCurrentUser($search); - $consultationsCollection = ConsultationSimpleResource::collection($consultations->paginate( - $listConsultationsRequest->get('per_page') ?? - config('escolalms_consultations.perPage', ConstantEnum::PER_PAGE) - )); + $consultationsCollection = ConsultationSimpleResource::collection($consultations->get()); ConsultationSimpleResource::extend(function (ConsultationSimpleResource $consultation) { return [ 'consultation_term_id' => $consultation->consultation_user_id,