feat(rest): 增加多表关联的兼容

Signed-off-by: 李东云 <dongyu.li@luxcreo.ai>
This commit is contained in:
李东云
2023-10-16 17:35:30 +08:00
parent 37d42c17cc
commit 17c0518680

View File

@@ -12,6 +12,7 @@ namespace Singularity\HDK\Core\Traits;
use Closure;
use Hyperf\Contract\LengthAwarePaginatorInterface;
use Hyperf\Database\Model\Builder;
use Hyperf\Database\Model\Relations\Relation;
use Hyperf\Di\Annotation\Inject;
use Hyperf\HttpServer\Contract\RequestInterface;
use Hyperf\Stringable\Str;
@@ -53,7 +54,7 @@ trait RestfulList
protected function responseFormatter(
array $options,
Builder $builder,
Builder|Relation $builder,
?Closure $filter = null
) {
$perPage = $options['size'] ?? null;