Our Black Friday sale is now live! All individual subscriptions are 50% OFF. This week only!



Member Since 4 Months Ago

Experience Points

4,940 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed
Best Reply Awards
Best Reply
  • start your engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-in-session Created with Sketch.

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber Created with Sketch.


    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.


    Earned if you have a lifetime subscription to Laracasts.

  • evangelist Created with Sketch.

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • chatty-cathy Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

Level 1
60 XP
4 months ago
Activity icon

Started a new Conversation Forum > Forward File From CURL Response Directly

Hello, I'm searching a solution to forward directly the answer of my cURL request. We have 2 API: 1 public (Laravel 5.8) and 1 private (Java, only local access) I make some verification, security, etc. in the public API. So when i've got a request, after verification, i send the request to the private API. The private API create a file from some files and return a file that correspond to params asked. I need to forward this audio/video files from the private API. But for the moment, i need to stock the file on the aol mail login PHP server before send it as an answer. I want to skip this step and forward the answer from my cURL directly. Is it possible? And if yes, how I could do it?

Here is my actual code: ` $ch = curl_init(); // build URL $url = $this->url.'stream-chunk?stream='.$stream->id_audio_stream_info.'&from='.$from; $url .= !is_null($to) ? '&to='.$to : ''; $url .= !is_null($bitRate) ? '&bit-rate='.$bitRate : ''; $url .= !is_null($quality) ? '&quality='.$quality : ''; $url .= !is_null($format) ? '&format='.$format : ''; $url .= !is_null($mode) ? '&mode='.$mode : ''; $url .= !is_null($sampleRate) ? '&sample-rate='.$sampleRate : '';

curl_setopt($ch,CURLOPT_URL,$url); $headers = [ 'Accept: /', 'Content-Type: application/json' ]; curl_setopt($ch, CURLOPT_HTTPHEADER,$headers); curl_setopt($ch,CURLOPT_FAILONERROR, true); curl_setopt($ch, CURLINFO_HEADER_OUT, true); curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);

$result = curl_exec($ch);

if ($result === FALSE) { $e = curl_error($ch); Log::error($url); Log::error($e); $error_code = curl_getinfo($ch , CURLINFO_HTTP_CODE); $error_message = $e; $response = [ 'msg'=>$error_message ]; $error_code = $error_code == 0 ? 400 : $error_code; curl_close($ch); return response()->json($response,$error_code); }

$code = curl_getinfo($ch, CURLINFO_HTTP_CODE ); $info = curl_getinfo($ch); curl_close($ch);

if ($code === 204) { return response()->json(['msg'=>'No Content'],$code); }

$mime_type = $info['content_type']; $file_size = $info['size_download'];

$response = response($result,200); $response->header('Accept','/'); $response->header('Content-Type',$mime_type); $response->header('Content-Length',$file_size); return $response; `

Activity icon

Replied to Can You Set Migrations To Have Already Been Run?

Thanks for the reply SCC. Actually, I've been facing the same issue from the hotmail login last couple of days. Moving a server is a hectic job for beginners. Anyways, will look into it. Thanks again.