Разбивка на сгруппированные запросы

Это было в моем .htaccess

DirectoryIndex index.html index.htm

index.html, содержащем PHP-код. По умолчанию PHP не будет обрабатывать файлы с такими расширениями, как htm *, как PHP-код.

Вы можете переопределить это, добавив следующее в .htaccess:

<FilesMatch ".+\.html$">
    SetHandler application/x-httpd-php
</FilesMatch>
0
задан Vitor Mattos 24 March 2019 в 20:05
поделиться

1 ответ

Попробуйте это

<?php 

use Illuminate\Pagination\LengthAwarePaginator;

$transactions = Transaction::all()->groupBy(function($transaction) {
  return Carbon::parse($transaction->date)->format('m-Y'); 
});

//new LengthAwarePaginator($data,$countOfData,$perPage,$currentPage);
$transactions=new LengthAwarePaginator($transactions->forPage($currentPage,$perPage),$transactions->count(),$currentPage);

Надеюсь, это поможет ...

0
ответ дан Tohid Dadashnezhad 24 March 2019 в 20:05
поделиться
Другие вопросы по тегам:

Похожие вопросы: