Skip to content

Conversation

@alexgilbertDG
Copy link
Contributor

Related to issue:
#34708

@alexgilbertDG alexgilbertDG changed the title fix LengthAwarePaginator translations issue [8.x] Fix LengthAwarePaginator translations issue Oct 6, 2020
@taylorotwell taylorotwell merged commit 54c7151 into laravel:8.x Oct 6, 2020
@bonzai
Copy link
Contributor

bonzai commented Oct 6, 2020

You can't use __() helper. If someone is using LengthAwarePagination outside of Laravel app, will now get this error:

$pagination = new Illuminate\Pagination\LengthAwarePaginator(['a', 'b', 'c'], 3, 1);

// Fatal error: Uncaught Error: Call to undefined function Illuminate\Pagination\__() […]
var_dump($pagination->toArray());

@alexgilbertDG
Copy link
Contributor Author

@bonzai What will be the better way then, a function check ? Or other translations methods ?

taylorotwell pushed a commit that referenced this pull request Oct 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants