百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
L

laravel-soap

> 后端框架
开源

Laravel的肥皂客户端包装

629 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

Laravel的肥皂客户端包装

Laravel SoapClient Wrapper

A SoapClient wrapper integration for Laravel.

Makes it easy to use Soap in a Laravel application.

Please report any bugs or features here:

https://github.com/artisaninweb/laravel-soap/issues/

Installation

Laravel

####Installation for Laravel 5.2 and above:

Run composer require artisaninweb/laravel-soap

Add the service provider in app/config/app.php.

php
Artisaninweb\SoapWrapper\ServiceProvider::class, 

To use the alias, add this to the aliases in app/config/app.php.

php
'SoapWrapper' => Artisaninweb\SoapWrapper\Facade\SoapWrapper::class,  

####Installation for Laravel 5.1 and below :

Add artisaninweb/laravel-soap as requirement to composer.json

javascript
{
    "require": {
        "artisaninweb/laravel-soap": "0.3.*"
    }
}

If you're using Laravel 5.5 or higher you can skip the two config setups below.

Add the service provider in app/config/app.php.

php
'Artisaninweb\SoapWrapper\ServiceProvider'

To use the facade add this to the facades in app/config/app.php.

php
'SoapWrapper' => 'Artisaninweb\SoapWrapper\Facade'

Lumen

Open bootstrap/app.php and register the required service provider:

php
$app->register(Artisaninweb\SoapWrapper\ServiceProvider::class);

register class alias:

php
class_alias('Artisaninweb\SoapWrapper\Facade', 'SoapWrapper');

Facades must be enabled.

Usage

How to add a service to the wrapper and use it.

…

Service functions

…

Classmap

If you are using classmap you can add folders like for example:

  • App\Soap
  • App\Soap\Request
  • App\Soap\Response

Request: App\Soap\Request\GetConversionAmount

php
CurrencyFrom = $CurrencyFrom;
    $this->CurrencyTo   = $CurrencyTo;
    $this->RateDate     = $RateDate;
    $this->Amount       = $Amount;
  }

  /**
   * @return string
   */
  public function getCurrencyFrom()
  {
    return $this->CurrencyFrom;
  }

  /**
   * @return string
   */
  public function getCurrencyTo()
  {
    return $this->CurrencyTo;
  }

  /**
   * @return string
   */
  public function getRateDate()
  {
    return $this->RateDate;
  }

  /**
   * @return string
   */
  public function getAmount()
  {
    return $this->Amount;
  }
}

Response: App\Soap\Response\GetConversionAmountResponse

php
GetConversionAmountResult = $GetConversionAmountResult;
  }

  /**
   * @return string
   */
  public function getGetConversionAmountResult()
  {
    return $this->GetConversionAmountResult;
  }
}

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

PHPlaravellumenphpsoap

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类后端框架
定价开源

> 相关工具

N
Node.js
基于 V8 的 JavaScript 运行时
D
Django
Python 高级 Web 框架
S
Spring Boot
Java 生态主流微服务框架