Giter VIP home page Giter VIP logo

laravel-csv's People

Contributors

vitorccs avatar xint0-elab avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

laravel-csv's Issues

Declaration of App\Exports\PostsFromCollection::collection() must be compatible with Vitorccs\LaravelCsv\Concerns\FromCollection::collection(): Illuminate\Support\Collection

Thanks, this package looks great!

I can't figure out how to use the FromCollection feature. It's the only one without any examples.
I'm trying this:

public function collection()
{
    return Post::all();
}

But I'm getting this:

Declaration of App\Exports\PostsFromCollection::collection() must be compatible with Vitorccs\LaravelCsv\Concerns\FromCollection::collection(): Illuminate\Support\Collection

Ideas? Thank you!

Set bom.

I need to set the UTF-8 BOM, for example as seen in the league/csv docs

$csv->setOutputBOM(Reader::BOM_UTF8);

Can I somehow get hold of that $csv add that somewhere?

Edit: If I read correctly this isn't even using league/csv, so that doesn't really helps.

But in my case I just would need to prepend $utf8_bom = "\xEF\xBB\xBF"; (the BOM for UTF-8) to the returned CSV.

Large Export Timeouts and Memory

this package is a massive speed increase compare to excel packages. so thanks.

but we are still hitting issues with large exports for timeouts and memory issues. eg +50000 rows via FromQuery

do yo have a way to append to csv sheet and off load memory consumption with each batch attempts?

thanks in advance

Illuminate\Queue\MaxAttemptsExceededException: Vitorccs\LaravelCsv\Jobs\CreateCsv has been attempted too many times or run too long. The job may have previously timed out. in /var/www/html/v2/laravel/vendor/laravel/framework/src/Illuminate/Queue/Worker.php:648

I know increasing the timeout and memory is an option but we need to set a limit.

[Suggestion] Accessing the stream directly

Hi, I would be open to submitting a PR for this to add ->stream() to the exportable, this can just return getStream() from ExportableService.php I think...?

Use case is for when we are building csv files on the fly and sending them via email, we do not need to store them to disk and creates additional unrequired steps.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.