You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I have a custom pagination class that extends Illuminate\Pagination\LengthAwarePaginator, and it's been bound in the service container. This works fine with the paginate() method. However, Scribe seems to instantiate the Illuminate\Pagination\LengthAwarePaginator class directly, which overrides the custom pagination class when generating documentation.
#[ResponseFromApiResource(
TaskCollection::class,
Task::class,
paginate: 15,
status: 200,
description: 'Request was successful',
collection: true,
)]
public function index(Request $request)
{
return new TaskCollection(Task::paginate(15));
//paginations are generated as expected but the documentation does not follow the same format as expected
}
Is there a workaround for Scribe to resolve the custom pagination class instead of Illuminate\Pagination\LengthAwarePaginator?
Scribe version
4.37
Your question
Hi, I have a custom pagination class that extends
Illuminate\Pagination\LengthAwarePaginator
, and it's been bound in the service container. This works fine with thepaginate()
method. However, Scribe seems to instantiate theIlluminate\Pagination\LengthAwarePaginator
class directly, which overrides the custom pagination class when generating documentation.Is there a workaround for Scribe to resolve the custom pagination class instead of Illuminate\Pagination\LengthAwarePaginator?
Docs
The text was updated successfully, but these errors were encountered: