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
How can I export laravel pagination data to Excel ? #44
Comments
Hi, thank you! I'm not sure I understand your need. Do you want to:
|
Thanks for answering , but I mean that how I can use pagination data result for exporting, as you know , Laravel pagination merhod every time return object includes "data" key and I couldn't access that , |
Sorry for the delay! I just tested and I think I understood the problem: you need to convert the array to a collection, just like this: $items = User::paginate(10);
$data = collect($items->toArray()['data']); // <- collect the data here.
return (new FastExcel($data))->download('file.xlsx'); I hope it's not too late for you! Let me know if you have any more question! |
@webcoweb Did it fix your issue? |
Hello,
at first thanks for this great package,
I wanna know how I can export excel file from Laravel pagination data ?
I mean this is blow:
because of I want to export excel file per page
I hope you help me as soon as you read it ...
The text was updated successfully, but these errors were encountered: