Я просто хочу спросить кое-что, связанное с laravel разбиением на страницы. У меня есть эта строка кода DB::select(DB::raw('my query here'));
в моем контроллере, но я хочу разбить результат этого запроса на страницы. Возможно ли это?
Обновление: это мой настоящий код.
$query = "SELECT
*
FROM
bil_tbl_billing_service_item AS bil_service_item
INNER JOIN bil_tbl_billing AS billing ON billing.ID = bil_service_item.billing_id
INNER JOIN dblink
('pofsis_business',
'SELECT
service_item.id as service_item_id,
service_item.series_num as service_item_series_num,
service_item.name as service_item_name,
service_item.particular as service_item_particular,
service_item.amount as service_item_amount,
vat_type.type as service_item_vat_type,
vat_type.rate as service_item_vat_rate
FROM
biz_tbl_service_item AS service_item
INNER JOIN biz_tbl_service_item_other as service_item_other on service_item_other.service_item_id = service_item.id
INNER JOIN biz_tbl_vat_type as vat_type on vat_type.id = service_item_other.type_of_vat_id') as service_item (service_item_id INTEGER, service_item_series_num VARCHAR, service_item_name VARCHAR, service_item_particular VARCHAR, service_item_amount NUMERIC, service_item_vat_type VARCHAR, service_item_vat_rate INTEGER) ON service_item.service_item_id = bil_service_item.service_item_id
WHERE billing.active = 1";
if($billingId !== null) {
$query = $query." AND billing.id = $billingId";
}
return db::select(db::raw($query));