Zipper
Zipper copied to clipboard
Non-static method Chumper\Zipper\Zipper::make() should not be called statically
Used on laravel 5.1
same in laravel 5.2. did you resolve?
This will work: $zipper = new Zipper(); $zipper->make($zipfile)->add($files);
This will work: $zipper = new Zipper(); $zipper->make($zipfile)->add($files);
still got error with this code
in routes.php file works well. but doesnt in any controller. for instance HomeController
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.
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()
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 https://github.com/Chumper/Zipper/issues/55#issuecomment-236949683, or mute the thread https://github.com/notifications/unsubscribe-auth/AK-TVjAAjdT3N2Bq60YbydeDGiwX1alkks5qb2g6gaJpZM4F5p1S .
cool! good luck!
Use the facade if you don't want to new-up an instance yourself.
use Chumper\Zipper\Facades\Zipper;
Zipper::make($path);
@ewstefan is the correct answer, thanks!