Thanks to this article, I found a solution to my problem, but I appreciate it if anyone can suggest a better solution.
class SoapController extends Controller
{
public function soap() {
$server = new \SoapServer('http://example.com/soap/soap.wsdl');
$server->setClass('App\SoapClass');
$response = new Response();
$response->headers->set("Content-Type","text/xml; charset=utf-8");
ob_start();
$server->handle();
$response->setContent(ob_get_clean());
return $response
}
}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community