PHPackages                             timwassenburg/laravel-pivot-table-generator - 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. timwassenburg/laravel-pivot-table-generator

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

timwassenburg/laravel-pivot-table-generator
===========================================

Quickly generate pivot tables for your projects

v1.0.1(3y ago)822.2k↓34.2%1[2 PRs](https://github.com/timwassenburg/laravel-pivot-table-generator/pulls)1MITPHP

Since Nov 14Pushed 1y ago1 watchersCompare

[ Source](https://github.com/timwassenburg/laravel-pivot-table-generator)[ Packagist](https://packagist.org/packages/timwassenburg/laravel-pivot-table-generator)[ Docs](https://github.com/timwassenburg/laravel-pivot-table-generator)[ RSS](/packages/timwassenburg-laravel-pivot-table-generator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (4)Versions (5)Used By (1)

[![Logo](img/banner.png)](img/banner.png)

[![Latest Version on Packagist](https://camo.githubusercontent.com/e58d6db6f86baf56570e40a4889ccaa582df259f40b30d64fbea5f7e9b3722a0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f74696d77617373656e627572672f6c61726176656c2d7069766f742d7461626c652d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/timwassenburg/laravel-pivot-table-generator)[![GitHub Tests Action Status](https://camo.githubusercontent.com/1201d5a6eb50d3c578513b039cdd2182ad7104d6b8a6a66ad84d5d74da92d2d0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f74696d77617373656e627572672f6c61726176656c2d7069766f742d7461626c652d67656e657261746f722f72756e2d74657374732e796d6c3f6272616e63683d6d6173746572266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/timwassenburg/laravel-pivot-table-generator/actions?query=workflow%3Arun-tests+branch%3Amaster)[![Total Downloads](https://camo.githubusercontent.com/5d8c5b1e0bdd324b61bf05455caffba9d57feb23a8f01f19664d83ab5f4f972b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f74696d77617373656e627572672f6c61726176656c2d7069766f742d7461626c652d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/timwassenburg/laravel-pivot-table-generator)[![License](https://camo.githubusercontent.com/fdefaea72659749a231be76e8621afc81383ce5a6176c28426d19ec1626cebef/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f74696d77617373656e627572672f6c61726176656c2d7069766f742d7461626c652d67656e657261746f72)](https://packagist.org/packages/timwassenburg/laravel-pivot-table-generator)

---

Table of Contents
-----------------

[](#table-of-contents)

1. [Installation](#installation)
2. [Usage](#usage)
3. [Testing](#testing)
4. [More generator packages](#more-generator-packages)
5. [Contributing](#contributing)
6. [License](#license)

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

[](#installation)

Install the package with composer.

```
composer require timwassenburg/laravel-pivot-table-generator --dev
```

Usage
-----

[](#usage)

Run the following command on the command-line to generate a new migration for the pivot table.

```
php artisan make:pivot {first_table_name} {second_table_name}
```

The command will create a new migration in `database/migrations`. Run the migrations to create the table.

```
php artisan migrate
```

Testing
-------

[](#testing)

Run the tests with:

```
composer test
```

More generator packages
-----------------------

[](#more-generator-packages)

Looking for more ways to speed up your workflow? Make sure to check out these packages.

- [Laravel Action Generator](https://github.com/timwassenburg/laravel-action-generator)
- [Laravel Pivot Table Generator](https://github.com/timwassenburg/laravel-pivot-table-generator)
- [Laravel Repository Generator](https://github.com/timwassenburg/laravel-repository-generator)
- [Laravel Service Generator](https://github.com/timwassenburg/laravel-service-generator)
- [Laravel Trait Generator](https://github.com/timwassenburg/laravel-trait-generator)

The packages mentioned above are part of [Laravel Artisan Extender](https://github.com/timwassenburg/laravel-artisan-extender).

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

[](#contributing)

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

License
-------

[](#license)

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

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

Total

2

Last Release

1117d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/18ef476c8a9d76d44ab65724fb4be330c1c4ce90e2be793bc4628b85bd0d5ba5?d=identicon)[timwass](/maintainers/timwass)

---

Top Contributors

[![timwassenburg](https://avatars.githubusercontent.com/u/75377381?v=4)](https://github.com/timwassenburg "timwassenburg (11 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (7 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (5 commits)")

---

Tags

artisanclidatabasegeneratorlaravelmigrationsphppivotphpclilaravelgeneratorartisanmigrationspivot

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/timwassenburg-laravel-pivot-table-generator/health.svg)

```
[![Health](https://phpackages.com/badges/timwassenburg-laravel-pivot-table-generator/health.svg)](https://phpackages.com/packages/timwassenburg-laravel-pivot-table-generator)
```

###  Alternatives

[xethron/migrations-generator

Generates Laravel Migrations from an existing database

3.3k3.3M25](/packages/xethron-migrations-generator)[oscarafdev/migrations-generator

Generates Laravel Migrations from an existing database

362585.2k](/packages/oscarafdev-migrations-generator)[nwidart/db-exporter

Export your database quickly and easily as a Laravel Migration and all the data as a Seeder class.

37839.1k](/packages/nwidart-db-exporter)[daavelar/revengedb

RevengeDb provides an artisan command to make a reverse engineer of the database, generating automatically the migrations for you

193.1k](/packages/daavelar-revengedb)

PHPackages © 2026

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