title: how to convert the pure soap php to laravel 5
body: <p>I am new in laravel 5. This code is ok in pure php. But I don't know how to convert this to laravel 5. Can you tell me how to transfer this code to laravel 5.</p>
  
  <p>client.php:</p>
  
  <pre><code>&lt;?php class client {
  public function __construct()
  {
      $params = array('location' =&gt; 'http://localhost:8888/csoap/server.php',
                      'uri' =&gt; 'urn://localhost:8888/csoap/server.php');
  
      /* Initialize webservice */
      $this-&gt;instance = new SoapClient(NULL, $params);
  }
  
  public function getString($id)
  {
      return $this-&gt;instance-&gt;__soapCall('getOutputString', $id);
  }
  }
  
  $client = new client();
  $id = array('id' =&gt; '1');
  
  echo $client-&gt;getString($id);
  ?&gt;
  </code></pre>
  
  <p>csoap/server.php:</p>
  
  <pre><code>&lt;?php class server {
  public function getOutputString($id)
  {
      $str = 'Youre ID is ' . $id . '.';
      return $str;
  }
  }
  
  $params = array('uri' =&gt; 'http://localhost:8888/csoap/server.php');
  $server =  new SoapServer(NULL, $params);
  $server-&gt;setClass('server');
  $server-&gt;handle();
  
  ?&gt;
  </code></pre>
  
  <p><strong>This is how I performed my installation in laravel 5.1</strong></p>
  
  <pre><code>"require": {
          "artisaninweb/laravel-soap": "0.2.*"
      }
  </code></pre>
  
  <p>run: composer install or composer update </p>
  
  <p>Add the service in config/app.php.</p>
  
  <pre><code>'providers' =&gt; [ 
  ...
  ...
  Artisaninweb\SoapWrapper\ServiceProvider', 
  ]
  
  'aliases' =&gt; [
  ...
  ...
  'SoapWrapper' =&gt; 'Artisaninweb\SoapWrapper\Facades\SoapWrapper'
  ]
  </code></pre>
  
  <p>This is my client soap:
      
  
  <pre><code>use Artisaninweb\SoapWrapper\Facades\SoapWrapper;
  
  class DataSoap {
  
  public function demo()
  {
      // Add a new service to the wrapper
      SoapWrapper::add(function ($service) {
          $service
              -&gt;name('mydata')
              -&gt;wsdl('http://localhost:8888/csoap/Server.php')
              -&gt;trace(true)
      });
  
      $data = [
          'str' =&gt; 'Hello World',
      ];
  
      // Using the added service
      SoapWrapper::service('mydata', function ($service) use ($data) {
          var_dump($service-&gt;getFunctions());
          var_dump($service-&gt;call('getString', [$data])-&gt;getSringResult);
      });
  }
  }
  </code></pre>
  
  <p>When I run the this code, I get an error </p>
  
  <pre><code>Class 'Artisaninweb\SoapWrapper\ServiceProvider' not found
  </code></pre>