PHPackages                             lao-liu/laravel-hprose - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. lao-liu/laravel-hprose

ActiveLibrary[API Development](/categories/api)

lao-liu/laravel-hprose
======================

Hprose client/server providers for Laravel 5.x or Lumen 5.x

0.9.1(9y ago)201.2k3MITPHPPHP &gt;=5.6.4

Since Dec 25Pushed 8y ago1 watchersCompare

[ Source](https://github.com/Lao-liu/laravel-hprose)[ Packagist](https://packagist.org/packages/lao-liu/laravel-hprose)[ RSS](/packages/lao-liu-laravel-hprose/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (3)Dependencies (4)Versions (4)Used By (0)

Hprose for laravel and lumen 5.x
================================

[](#hprose-for-laravel-and-lumen-5x)

Hprose

`HPROSE` is a High Performance Remote Object Service Engine.

It is a modern, lightweight, cross-language, cross-platform, object-oriented, high performance, remote dynamic communication middleware. It is not only easy to use, but powerful.

Installation
------------

[](#installation)

```
# composer
composer require lao-liu/laravel-hprose

```

For Laravel 5.x
---------------

[](#for-laravel-5x)

### Configuration

[](#configuration)

```
# edit app/config/app.php
# include the provider
'providers' => [
    [...]
    Laoliu\LaravelHprose\HproseServiceProvider::class,
];

# include the alias
'aliases' => [
    [...]
    'RpcClient'    => Laoliu\LaravelHprose\HproseClientFacade::class,
    'RpcServer'    => Laoliu\LaravelHprose\HproseServerFacade::class,
    'RpcService'   => Laoliu\LaravelHprose\HproseServiceFacade::class,
];

# Laravel config
php artisan vendor:publish --provider="Laoliu\LaravelHprose\HproseServiceProvider"
```

config file

```
# config/hprose.php

```

### Usage for laravel

[](#usage-for-laravel)

#### Hprose client

[](#hprose-client)

```
use RpcClient as Rpc;
$result = Rpc::someServerMethod($params);
```

#### Hprose server

[](#hprose-server)

```
Route::any('/api', function() {
    $server = app('RpcServer');

    // Hprose support XmlRPC and JsonRPC
    // if want support XmlRpc
    $server->addFilter(new Hprose\Filter\XMLRPC\ServiceFilter());
    // if want support JsonRpc
    $server->addFilter(new Hprose\Filter\JSONRPC\ServiceFilter());

    $server->addInstanceMethods(new \App\Services\SomeHprosePublishServices());
    $server->start();
});
```

### Middleware setting

[](#middleware-setting)

```
# app/Http/Middleware/VerifyCsrfToken.php
[...]
protected $except = [
    'api' // OR 'api*'
];
```

Done.

For Lumen 5.x
-------------

[](#for-lumen-5x)

### Configuration

[](#configuration-1)

```
# edit bootstrap/app.php
$app->register(Laoliu\LaravelHprose\HproseServiceProvider::class);

[...]

class_alias('Laoliu\LaravelHprose\HproseClientFacade', 'RpcClient');
class_alias('Laoliu\LaravelHprose\HproseServerFacade', 'RpcServer');
class_alias('Laoliu\LaravelHprose\HproseServiceFacade', 'RpcService');

return $app;
```

### Usage for lumen

[](#usage-for-lumen)

#### Hprose client

[](#hprose-client-1)

```
$rpc = app('RpcClient')->useService('http://hproseServiceUrl/', $async);
$result = $rpc->remoteMethods($params);
```

#### Hprose server

[](#hprose-server-1)

```
Route::any('/api', function() {
    $server = app('RpcServer');

    // Hprose support XmlRPC and JsonRPC
    // if want support XmlRpc
    $server->addFilter(new Hprose\Filter\XMLRPC\ServiceFilter());
    // if want support JsonRpc
    $server->addFilter(new Hprose\Filter\JSONRPC\ServiceFilter());

    $server->addInstanceMethods(new \App\Services\SomeHprosePublishServices());
    $server->start();
});
```

### API Reference

[](#api-reference)

Please refer to

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

3

Last Release

3424d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a54ced4bfef38974acc91312dbaf7663f75c06e659ac41eafd52ecb1819fde90?d=identicon)[Laoliu](/maintainers/Laoliu)

---

Top Contributors

[![Lao-liu](https://avatars.githubusercontent.com/u/640735?v=4)](https://github.com/Lao-liu "Lao-liu (18 commits)")

---

Tags

laravelrpclumenjsonrpcxmlrpcwebserviceHprose

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/lao-liu-laravel-hprose/health.svg)

```
[![Health](https://phpackages.com/badges/lao-liu-laravel-hprose/health.svg)](https://phpackages.com/packages/lao-liu-laravel-hprose)
```

###  Alternatives

[hprose/hprose

It is a modern, lightweight, cross-language, cross-platform, object-oriented, high performance, remote dynamic communication middleware. It is not only easy to use, but powerful. You just need a little time to learn, then you can use it to easily construct cross language cross platform distributed application system.

2.1k215.3k37](/packages/hprose-hprose)[mollie/laravel-mollie

Mollie API client wrapper for Laravel &amp; Mollie Connect provider for Laravel Socialite

3624.1M28](/packages/mollie-laravel-mollie)[hprose/hprose-swoole

Hprose asynchronous client &amp; standalone server based on swoole

17928.9k9](/packages/hprose-hprose-swoole)[vluzrmos/slack-api

Wrapper for Slack.com WEB API.

102589.1k3](/packages/vluzrmos-slack-api)[hprose/hprose-yii

Hprose Server for Yii 2

357.1k](/packages/hprose-hprose-yii)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
