PHPackages                             upingli/hofan - 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. [Framework](/categories/framework)
4. /
5. upingli/hofan

ActiveLibrary[Framework](/categories/framework)

upingli/hofan
=============

Hofan lavaral components.

v0.1.1(5y ago)061Apache-2.0PHPPHP ^7.3

Since Nov 25Pushed 5y ago1 watchersCompare

[ Source](https://github.com/upingli/hofan)[ Packagist](https://packagist.org/packages/upingli/hofan)[ RSS](/packages/upingli-hofan/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (5)Dependencies (4)Versions (7)Used By (0)

Hofan components for Laravel
============================

[](#hofan-components-for-laravel)

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

[](#installation)

You can install this package via composer using this command:

```
composer require upingli/hofan

```

The queue components in this package is based on vladimir-yuldashev/laravel-queue-rabbitmq. Because laravel-queue-rabbitmq serialize message in queue by using PHP serialize(), which can not be realized by the other language, it's unfriendly. This component provide a JSON serialized format for message to exchange message for the other non-PHP system.

Before use this component, you must config it.

Add connection to `config/queue.php`:

```
'default' => env('QUEUE_CONNECTION', 'sync'),
//Not required, if you want to use a second conenection to avoid use the default one, add the below line. Otherwise, will use the default.
'second'  => env('QUEUE_CONNECTION2', 'rabbitmq'),

'connections' => [
    // ...

    'rabbitmq' => [

       'driver' => 'rabbitmq',
       'queue' => env('RABBITMQ_QUEUE', 'default'),
       'connection' => PhpAmqpLib\Connection\AMQPLazyConnection::class,

       'hosts' => [
           [
               'host' => env('RABBITMQ_HOST', '127.0.0.1'),
               'port' => env('RABBITMQ_PORT', 5672),
               'user' => env('RABBITMQ_USER', 'guest'),
               'password' => env('RABBITMQ_PASSWORD', 'guest'),
               'vhost' => env('RABBITMQ_VHOST', '/'),
           ],
       ],

       'options' => [
           'ssl_options' => [
               'cafile' => env('RABBITMQ_SSL_CAFILE', null),
               'local_cert' => env('RABBITMQ_SSL_LOCALCERT', null),
               'local_key' => env('RABBITMQ_SSL_LOCALKEY', null),
               'verify_peer' => env('RABBITMQ_SSL_VERIFY_PEER', true),
               'passphrase' => env('RABBITMQ_SSL_PASSPHRASE', null),
           ],
       ],

       /*
        * Set to "horizon" if you wish to use Laravel Horizon.
        */
       'worker' => env('RABBITMQ_WORKER', 'default'),

    ],

    // ...
],
```

Example for create order using rabbitmq queue:

```
class TestController extends \Illuminate\Routing\Controller
{
    $order = new OrderTransit();
    OrderQueueCall::createOrder($order);
}
```

The result of createOrder() will be handled by cn\\hofan\\Queue\\Jobs\\OrderJsonJob. If you want to handle it yourself, there is a example.

Define your job:

```
class MyJob extends JsonJob
{
    protected function handle(string $command, $result)
    {
        if($command = "CREATE_ORDER_RESULT")
        {
            //Handle result for createOrder
        }

        return true;
    }
}
```

Then change the code in controller:

```
class TestController extends \Illuminate\Routing\Controller
{
    $order = new OrderTransit();
    OrderQueueCall::createOrder($order, MyJob::class);
}
```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

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 ~0 days

Total

6

Last Release

1994d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2c11b7fbc6a339fda18ad1de27bfb4548ed131cde5dc2037cba1f87307957a72?d=identicon)[UpingLi](/maintainers/UpingLi)

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/upingli-hofan/health.svg)

```
[![Health](https://phpackages.com/badges/upingli-hofan/health.svg)](https://phpackages.com/packages/upingli-hofan)
```

###  Alternatives

[codewithdennis/larament

Larament is a time-saving starter kit to quickly launch Laravel 13.x projects. It includes FilamentPHP 5.x pre-installed and configured, along with additional tools and features to streamline your development workflow.

3691.5k](/packages/codewithdennis-larament)[ecotone/laravel

Laravel integration for Ecotone

21307.6k3](/packages/ecotone-laravel)

PHPackages © 2026

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