Hey Guys!
got the same problem! PHP sample on webspace works fine, but in Laravel 5.4 can't get it to work!
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I am using curl inside Controller to download a file. I would like to display a progress while file is downloading. I've read about that here: http://stackoverflow.com/questions/13958303/curl-download-progress-in-php
these two lines are needed:
curl_setopt($ch, CURLOPT_PROGRESSFUNCTION, 'progress');
curl_setopt($ch, CURLOPT_NOPROGRESS, false);
I've placed them inside a function in my controller but I am getting this error: curl_exec(): Cannot call the CURLOPT_PROGRESSFUNCTION
I am suspecting that it's not working because it can't call it like progress() it should call it like $this->progress(). Is that correct? How do I specify this if my assumption is correct, if not what am I doing wrong?
Please or to participate in this conversation.