0

For some reason I don't manage to use SoapClient, even though (as you can see on the image) it is well referenced

enter image description here

<?php
namespace App\Http\Controllers;
use SoapClient;

class InsuranceController extends Controller
{
    function createBooking($wsdl){
        $ws  = new SoapClient($wsdl);
        $ret  = $ws->transaction($xml);

I get this error: Class 'SoapClient' not found

I tried adding it in app.php

'SoapClient' => SoapClient::class

and I also tried using \SoapClient() also, instead of SoapClient()

Any idea?

Thank you very much

Maxiss
  • 986
  • 1
  • 16
  • 35
  • 1
    Your php installation is probably missing the SOAP extension. Please refer to this topic for more info: [https://stackoverflow.com/questions/11391442/fatal-error-class-soapclient-not-found](https://stackoverflow.com/questions/11391442/fatal-error-class-soapclient-not-found) – Thepeanut Jun 25 '19 at 10:09
  • thanks a lot, I added it in php.ini and restarted and it worked – Maxiss Jun 25 '19 at 11:28

0 Answers0