You should be able to use $request->getContent() for that.
Access raw php://input
Is it possible to access raw
php://input
I am refactoring an App originally written in CodeIgniter to L5. The app communicates in the most horrible SOAP implementation you've ever seen with one of the major Credit Bureaus. (Their API, not mine. It's the only one they offer, so we MUST use it).
Once a credit report is ready, the Credit Bureau's API simply posts raw XML to a URL of our choosing.
In CodeIgniter the security settings always prevented me from accessing the raw PHP input. Since it's not key/val posting there is no variable to assign it to, so it always shows up as an empty post request when using $_POST; Essentially the only way I found to access the XML was
$xml = file_get_contents('php://input');
In order to make it work, I had hack CI so that if a request was coming in to a specific URL it was going to a file that existing outside the framework so I could process it (manually having to build up Database connections etc...). CI wouldn't even let me access php://input.
I am hoping in Laravel that I can either use Middleware to exempt a route and be able to access it via a built in method (or even the php://input isn't the end of the world).
I'll be preparing to build this part of my app in the next few weeks and I am just trying to plan ahead. (I still have to deal with all this SOAP BS that this place currently uses) (Side note, they are launching a RESTful API in July and will switch from Soap to JSON, but they are still just going to raw post it to a URL...annoying).
Please or to participate in this conversation.