A formdata is to send data from a client to the backend via an HTTP client like for example axios.
A formdata is typically in JavaScript, I can't imagine how you could create a formdata in a Laravel controller and send it back to the client.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I'm trying to let users download files for github like pet project i'm trying to build but i want to add some other key-value data with those files just like how clients send formdata to the servers but i don't know if thats a good idea to begin with. What other alternatives can i consider?
Please or to participate in this conversation.