Laravel 4是否有一个库来发送XML SOAP请求,或者是否有正确的方法在Laravel中执行此操作而不是使用CURL手动执行此操作?
I'm not familiar with Laravel, but PHP itself has a very nice class called SoapClient
which you can use to send SOAP requests in a couple of lines. There's definitely no need to do it with cURL.
Laravel does not contain any XML/SOAP libraries out of the box.
However, since Laravel is composer-friendly, you can use any SOAP Composer package .
You can use built in PHP SoapClient Class in Laravel
by simply adding SoapClient class in app/config.php aliases Array
'SoapClient' => SoapClient::class
And whenever you want to use SoapClient Class just add use SoapClient;
in the file.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.