kduma/laravel-soap-server

Laravel SOAP service server

Maintainers

Package info

github.com/kduma-OSS/LV-soap-server

Homepage

pkg:composer/kduma/laravel-soap-server

Statistics

Installs: 21 543

Dependents: 0

Suggesters: 0

Stars: 20

Open Issues: 1

dev-master 2026-04-08 15:19 UTC

This package is auto-updated.

Last update: 2026-04-08 15:22:30 UTC


README

Latest Stable Version Total Downloads License

Wrapper for creating SOAP web service servers in Laravel using Laminas/Soap.

Requirements

  • PHP ^8.3
  • Laravel ^12.0 || ^13.0
  • ext-soap

Installation

composer require kduma/laravel-soap-server

Usage

Create a service class:

class MathService
{
    /** @param float $a */
    /** @param float $b */
    public function add(float $a = 0, float $b = 0): float
    {
        return $a + $b;
    }
}

Create a controller:

class MySoapController extends \KDuma\SoapServer\AbstractSoapServerController
{
    protected function getService(): string { return MathService::class; }
    protected function getEndpoint(): string { return route('soap'); }
    protected function getWsdlUri(): string { return route('soap.wsdl'); }
}

Register routes:

Route::name('soap.wsdl')->get('/soap.wsdl', [MySoapController::class, 'wsdlProvider']);
Route::name('soap')->post('/soap', [MySoapController::class, 'soapServer']);