PHPackages                             hms5232/webman-factory - 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. hms5232/webman-factory

ActiveLibrary[Framework](/categories/framework)

hms5232/webman-factory
======================

Factory for webman framework.

v0.2.0(10mo ago)013MITPHPPHP ^8.1

Since Jul 27Pushed 10mo agoCompare

[ Source](https://github.com/hms5232/webman-factory)[ Packagist](https://packagist.org/packages/hms5232/webman-factory)[ RSS](/packages/hms5232-webman-factory/feed)WikiDiscussions main Synced today

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

webman-factory
==============

[](#webman-factory)

Factory for webman framework.

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

[](#installation)

```
composer require --dev hms5232/webman-factory
```

You can remove the `--dev` flag as your need.

Usage
-----

[](#usage)

Like [Laravel factory](https://laravel.com/docs/eloquent-factories), but there are something different, and you need to do the following additional:

- The factory class should extend `Hms5232\WebmanFactory\WebmanFactory`:

    ```
    use Hms5232\WebmanFactory\WebmanFactory;

    class AdminFactory extends WebmanFactory
    {
        /**
         * Define the model's default state.
         *
         * @return array
         */
        public function definition()
        {
            return [
                'name' => $this->faker->name(),
                'email' => $this->faker->unique()->safeEmail(),
            ];
        }
    }
    ```
- The model class should use `Hms5232\WebmanFactory\HasFactory` instead of `Illuminate\Database\Eloquent\Factories\HasFactory`:

    ```
    - use Illuminate\Database\Eloquent\Factories\HasFactory;
    + use Hms5232\WebmanFactory\HasFactory;

    class Admin extends Model
    {
        use HasFactory;
    }
    ```

    otherwise, you should specify the factory:

    ```
    // app/model/Admin.php

    use database\factories\AdminFactory;

    /**
     * Create a new factory instance for the model.
     */
    protected static function newFactory()
    {
        return AdminFactory::new();
    }
    ```

### Additional Features

[](#additional-features)

Here are some additional features that can't be used before install related dependencies. Run the following command to see the details:

```
composer suggests hms5232/webman-factory

```

#### Command

[](#command)

We also provide `make:factory` to generate a new factory like Laravel:

```
php webman make:factory AdminFactory
```

The `AdminFactory` will be created in `database/factories/AdminFactory.php` and suppose the model is `app/model/Admin.php` by default. You can change these paths in `config/plugin/hms5232/webman-factory/app.php`.

License
-------

[](#license)

[MIT](LICENSE)

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance54

Moderate activity, may be stable

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

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

Total

3

Last Release

313d ago

### Community

Maintainers

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

---

Top Contributors

[![hms5232](https://avatars.githubusercontent.com/u/43672033?v=4)](https://github.com/hms5232 "hms5232 (19 commits)")

---

Tags

webman

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/hms5232-webman-factory/health.svg)

```
[![Health](https://phpackages.com/badges/hms5232-webman-factory/health.svg)](https://phpackages.com/packages/hms5232-webman-factory)
```

###  Alternatives

[elgg/elgg

Elgg is an award-winning social networking engine, delivering the building blocks that enable businesses, schools, universities and associations to create their own fully-featured social networks and applications.

1.7k16.4k79](/packages/elgg-elgg)[bowphp/framework

The bow PHP Framework

6017.5k13](/packages/bowphp-framework)[sylius/core-bundle

Sylius core bundle. It integrates all other bundles into full stack Symfony ecommerce solution.

22111.4k69](/packages/sylius-core-bundle)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1235.9k20](/packages/fleetbase-core-api)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[lion/bundle

Lion-framework configuration and initialization package

122.4k4](/packages/lion-bundle)

PHPackages © 2026

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