Skip to content
This repository has been archived by the owner on Feb 25, 2020. It is now read-only.

Non-static method Chumper\Zipper\Zipper::make() should not be called statically #55

Open
Danjavia opened this issue Sep 8, 2015 · 10 comments

Comments

@Danjavia
Copy link

Danjavia commented Sep 8, 2015

Used on laravel 5.1

@includeleec
Copy link

same in laravel 5.2.
did you resolve?

@inaydich
Copy link

inaydich commented Jul 29, 2016

This will work:
$zipper = new Zipper();
$zipper->make($zipfile)->add($files);

@robertoandres24
Copy link

This will work:
$zipper = new Zipper();
$zipper->make($zipfile)->add($files);

still got error with this code

@robertoandres24
Copy link

in routes.php file works well. but doesnt in any controller. for instance HomeController

@inaydich
Copy link

inaydich commented Aug 2, 2016

what error do you get? did you reference "use Chumper\Zipper\Zipper;" in controller? I am using php7-laravel5.2. It is working for me.

@robertoandres24
Copy link

sorry. my mistake.
use Chumper\Zipper\Zipper;
$zipper = new Zipper();
$zipper->make($zipfile)->add($files);
this works for me.
i was trying call method make this $zipper::make()
instead of $zipper->make()

@robertoandres24
Copy link

y es thanks. miss the reference .its working for me too now
El ago. 2, 2016 12:54 PM, "inaydich" [email protected] escribió:

what error do you get? did you reference "use Chumper\Zipper\Zipper;" in
controller? I am using php7-laravel5.2. It is working for me.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#55 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AK-TVjAAjdT3N2Bq60YbydeDGiwX1alkks5qb2g6gaJpZM4F5p1S
.

@inaydich
Copy link

inaydich commented Aug 2, 2016

cool! good luck!

@ewstefan
Copy link

Use the facade if you don't want to new-up an instance yourself.

use Chumper\Zipper\Facades\Zipper;

Zipper::make($path);

@JoaoPortella
Copy link

@ewstefan is the correct answer, thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants