Level 27
$binary = file_get_contents('php://input');
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Any idea how I can save this file in a Laravel controller? The standard response() doesn't recognize a file. Thank you.
curl "https://my.laravel.com/upload?filename=user_crash.log" -X POST --data-binary @user_crash.log -H "Content-Type: application/binary"
$binary = file_get_contents('php://input');
Please or to participate in this conversation.