resource instanceof AbstractPaginator ? (new CustomPaginatedResourceResponse($this))->toResponse($request) : parent::toResponse($request); } }