I want to use SoapClient but it returns error: Class 'SoapClient' not found
. I have windows+xampp and in my php.ini
I coludn't find ;extension=php_soap.dll
to uncomment it in order to enable that so I added it in extension=php_soap.dll
. It didn't work.
I created a new php file to use pure php code there: var_dump(new SoapClient($url))
so it didn't return error but got result correctly. So I got that the problem might be from namespace but when I put a backslash before SoapClient, it should work isn't it?
And here is my code:
namespace App\Http\Controllers\Gateways;
use App\Http\Controllers\Controller;
use \SoapClient;
class BankController extends GatewayController {
public function requestGateway() {
...
$client = new SoapClient($url);
}
}