PHPackages                             hsuan/laravel-relation-maker - 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. [Database &amp; ORM](/categories/database)
4. /
5. hsuan/laravel-relation-maker

ActiveLibrary[Database &amp; ORM](/categories/database)

hsuan/laravel-relation-maker
============================

LaravelRelationMaker to help people generate model with relation

v0.0.3(4y ago)517.3k3MITPHPPHP &gt;=7.4

Since Jun 30Pushed 4y ago1 watchersCompare

[ Source](https://github.com/hsuan1117/laravel-relation-maker)[ Packagist](https://packagist.org/packages/hsuan/laravel-relation-maker)[ Docs](https://github.com/hsuan/laravel-relation-maker)[ GitHub Sponsors](https://github.com/hsuan)[ RSS](/packages/hsuan-laravel-relation-maker/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (1)Dependencies (8)Versions (4)Used By (0)

LaravelRelationMaker
====================

[](#laravelrelationmaker)

[![Latest Version on Packagist](https://camo.githubusercontent.com/ebbfe59b4461c53cbb3e600669422663a00d17af1884355d84c5a3f4b06db6ce/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f687375616e2f6c61726176656c2d72656c6174696f6e2d6d616b65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/hsuan/laravel-relation-maker)[![GitHub Tests Action Status](https://camo.githubusercontent.com/e1377eba8220f8e417c60dd542b52598e77bb36604da39aeca681b4a9a8b73f1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f687375616e313131372f6c61726176656c2d72656c6174696f6e2d6d616b65722f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/hsuan/laravel-relation-maker/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/d77b84815605e79864dfc30e189f99168eededd1dac54a91615e8bf314161fff/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f687375616e313131372f6c61726176656c2d72656c6174696f6e2d6d616b65722f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/hsuan/laravel-relation-maker/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/5144ceb0f9b961226422e52012fda424dde92076724b47901da6c25ffd454276/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f687375616e2f6c61726176656c2d72656c6174696f6e2d6d616b65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/hsuan/laravel-relation-maker)

The package can help you generate model, migrations for eloquent relationship. For example, `php artisan make:relation Food hasMany Cookie`

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

[](#installation)

You can install the package via composer:

```
composer require hsuan/laravel-relation-maker --dev
```

You can publish the stubs with:

```
php artisan vendor:publish --provider="Hsuan\LaravelRelationMaker\LaravelRelationMakerServiceProvider" --tag="laravel-relation-maker-stubs"
```

Usage
-----

[](#usage)

```
php artisan make:relation {modelA} {relationship} {modelB}
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Hsuan](https://github.com/hsuan1117)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity44

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

Total

3

Last Release

1814d ago

PHP version history (2 changes)v0.0.1PHP ^7.4

v0.0.2PHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/4acfa1c33c056ae4075d83a191cb2535a5bd5d3d7e2dbde8a160e7d06503a3d8?d=identicon)[hsuan](/maintainers/hsuan)

---

Top Contributors

[![hsuan1117](https://avatars.githubusercontent.com/u/34859514?v=4)](https://github.com/hsuan1117 "hsuan1117 (9 commits)")

---

Tags

laravelhsuanlaravel-relation-maker

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/hsuan-laravel-relation-maker/health.svg)

```
[![Health](https://phpackages.com/badges/hsuan-laravel-relation-maker/health.svg)](https://phpackages.com/packages/hsuan-laravel-relation-maker)
```

###  Alternatives

[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k102.4M1.4k](/packages/spatie-laravel-permission)[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[dedoc/scramble

Automatic generation of API documentation for Laravel applications.

2.1k11.2M100](/packages/dedoc-scramble)[wnx/laravel-backup-restore

A package to restore database backups made with spatie/laravel-backup.

213420.1k2](/packages/wnx-laravel-backup-restore)[spatie/laravel-passkeys

Use passkeys in your Laravel app

471890.7k39](/packages/spatie-laravel-passkeys)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)

PHPackages © 2026

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