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

Allow for explicit output filetype selection #348

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

alexszeliga
Copy link

In my use case, I want to stream my export to a download without creating a file, so I use the PHP write only output stream, php://output, but that limits me to using xlsx, with no way to stream csv.

I changed the signature to the download and export methods to allow for an optional extension. When provided, it allows the developer to explicitly select any file type, regardless of filename.

@alexszeliga
Copy link
Author

I simplified the complexity issue and removed a Laravel Str helper dependency, since PHP 8 has semantic methods to replace them.

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.

1 participant