Coder Social home page Coder Social logo

Zip not found about laravel-zipstream HOT 7 CLOSED

stechstudio avatar stechstudio commented on July 21, 2024
Zip not found

from laravel-zipstream.

Comments (7)

plompd avatar plompd commented on July 21, 2024

If I do it like this, I don't get errors:
$zip = ZipStreamFacade::create("acrhive.zip", ["/tmp/test1.txt", "/tmp/test2.txt"]);

from laravel-zipstream.

jszobody avatar jszobody commented on July 21, 2024

What are you importing at the top of your file?

If you...

use Zip;

You should be able to call Zip::create. This package adds a root level Zip alias, but you still have to import it.

from laravel-zipstream.

plompd avatar plompd commented on July 21, 2024

I did add use Zip

But it cannot be found, hence it gives an error.

from laravel-zipstream.

jszobody avatar jszobody commented on July 21, 2024

This package registers a root Zip alias to the ZipStreamFacade here:

https://github.com/stechstudio/laravel-zipstream/blob/master/composer.json#L51

I have no idea why that's not working for you. I can't reproduce at all, tried installing in a fresh Laravel app and immediately was able to use Zip.

Using ZipStreamFacade is functionally the same though, so if that works for you I suppose that's what you'll need to do. If anyone else has any experience with composer aliases not seeming to work, I'm eager to learn here.

from laravel-zipstream.

plompd avatar plompd commented on July 21, 2024

I'm using this on Windows. Could that be a problem? Although I tried it on MacOS also...

from laravel-zipstream.

tonnerre33 avatar tonnerre33 commented on July 21, 2024

I have the same problem.
I tried using : use STS\ZipStream\ZipStreamFacade;
and ZipStreamFacade::create(....) but i got "unexpected create"

Edit: ok my bad, it's working now :

return  ZipStreamFacade::create("package.zip", [
            "/path/to/Some File.pdf",
            "/path/to/Export.xlsx"
        ]);
        

from laravel-zipstream.

shehwar007 avatar shehwar007 commented on July 21, 2024

'Zip'=> STS\ZipStream\ZipStreamFacade::class,
STS\ZipStream\ZipStreamServiceProvider::class,
add in app.php file

from laravel-zipstream.

Related Issues (20)

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.