31 lines
643 B
PHP
31 lines
643 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Services\NikarayanService;
|
|
use Illuminate\Support\ServiceProvider;
|
|
use SoapClient;
|
|
|
|
class NikarayanServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Register services.
|
|
*/
|
|
public function register(): void
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Bootstrap services.
|
|
*/
|
|
public function boot(): void
|
|
{
|
|
$this->app->bind(NikarayanServiceProvider::class, function () {
|
|
$url = "https://riws.rmto.ir/WebServices/NRPTrafficStatus.asmx?wsdl";
|
|
$soapClient = new SoapClient($url);
|
|
return new NikarayanService($soapClient);
|
|
});
|
|
}
|
|
}
|