Это было в моем .htaccess
DirectoryIndex index.html index.htm
index.html, содержащем PHP-код. По умолчанию PHP не будет обрабатывать файлы с такими расширениями, как htm *, как PHP-код.
Вы можете переопределить это, добавив следующее в .htaccess:
<FilesMatch ".+\.html$">
SetHandler application/x-httpd-php
</FilesMatch>
Попробуйте это
<?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);
Надеюсь, это поможет ...