Почему массив ресурсов не возвращает данные о пагинации?
$leftJoinQuery = Sale::query()
->addSelect('shop_bx_id')
->addSelect(DB::raw('sum(checks) as checks'))
->addSelect(DB::raw('sum(return_sum) as return_sum'));
->groupBy('shop_bx_id');
Shop::query()
->leftJoinSub($leftJoinQuery, 'sales', 'sales.shop_bx_id', '=', 'shops.bx_id')
->get();
$data = \App\Models\user::query()->with('post')->paginate(2);
dd($data[0]->post);
Но у меня файл с роутами "самодельный"))
FROM python:3.7-slim-buster as docs
ENV PYTHONUNBUFFERED 1
RUN apt-get update \
# dependencies for building Python packages
&& apt-get install -y build-essential \
# psycopg2 dependencies
&& apt-get install -y libpq-dev \
# Translations dependencies
&& apt-get install -y gettext \
# cleaning up unused files
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/*
RUN pip install sphinx && pip install sphinx-rtd-theme
WORKDIR /docs
CMD make html
###
FROM nginx:latest as nginx
COPY --from=docs /docs /var/www/html/public
CMD ["nginx", "-g", "daemon off;"]
$cars->where('price', '>=', $request->minPrice);
$cars->whereHas('priceHistory', function ($q) {
$q->where('price', '>=', $request->minPrice);
});