Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Method Collection::linkCollection does not exist #70

Closed
rudiedirkx opened this issue Sep 3, 2022 · 3 comments · Fixed by #71
Closed

Error: Method Collection::linkCollection does not exist #70

rudiedirkx opened this issue Sep 3, 2022 · 3 comments · Fixed by #71

Comments

@rudiedirkx
Copy link

I'm getting an error after opening a log file (in the popup/overlay):

Method Illuminate\Support\Collection::linkCollection does not exist. (View: .../vendor/opcodesio/log-viewer/resources/views/pagination.blade.php) (View: .../vendor/opcodesio/log-viewer/resources/views/pagination.blade.php)

That's this line in the view:

$links = $paginator->linkCollection()->toArray();

My Laraval version is 8.33.1. Maybe linkCollection is newer? That should be in the requirements. Or maybe my custom setup is breaking something.

My Illuminate\Pagination\LengthAwarePaginator does have a method linkCollection, but it's protected.

@rudiedirkx
Copy link
Author

If I change protected function linkCollection to public everything works perfectly, but eeeeeeh naaah. Did linkCollection change in some newer Laravel version or something?

@arukompas
Copy link
Contributor

arukompas commented Sep 3, 2022

@rudiedirkx - you're right! It was made public only in Laravel 8.37.0 - laravel/framework#36959

Pushing a fix soon.

@arukompas
Copy link
Contributor

@rudiedirkx fixed in the new release, v1.2.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants