PHPackages                             amohamed/laravelmodelmaker - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. amohamed/laravelmodelmaker

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

amohamed/laravelmodelmaker
==========================

LaravelModelMaker is a powerful and easy-to-use package for Laravel developers...

v1.0.0(3y ago)4161MITPHPPHP ^7.3|^8.0

Since May 6Pushed 2y ago1 watchersCompare

[ Source](https://github.com/Abdallah-Tah/laravelmodelmaker)[ Packagist](https://packagist.org/packages/amohamed/laravelmodelmaker)[ RSS](/packages/amohamed-laravelmodelmaker/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

Laravel Model Maker
===================

[](#laravel-model-maker)

Laravel Model Maker is a package that simplifies the process of generating models, migrations, and relationships in Laravel projects. It provides a set of artisan commands to create models with their corresponding migrations and relationships in a single command.

Features
--------

[](#features)

- Generate models with their corresponding migrations.
- Create relationships (hasOne, hasMany, belongsTo, and belongsToMany) between models.
- Easy to use artisan commands with a simple syntax.

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

[](#installation)

To install the Laravel Model Maker package, use the following composer command:

```
composer require amohamed/laravelmodelmaker --dev
```

It is recommended to only require the package for development.

Usage
-----

[](#usage)

To generate a model and its migration, use the `generate-model` command:

```
php artisan atm:generate-model ModelName --fields="name:string:nullable,age:integer:unsigned:default(18),email:string:unique"
```

This command will create a model named `ModelName` in the app directory and its corresponding migration in the database/migrations directory. The migration will contain the name and age `fields`.

Generate Relationships
----------------------

[](#generate-relationships)

To generate relationships for an existing model, use the atm:generate-relationship command:

```
php artisan atm:generate-relationship
```

This command will prompt you to choose the desired relationships and related models for the specified model.

Example
-------

[](#example)

[![Laravel Model Maker Example](./src/images/01.png)](./src/images/01.png)[![Laravel Model Maker Example](./src/images/02.png)](./src/images/02.png)

Available Options and Flags
---------------------------

[](#available-options-and-flags)

```
$ php artisan atm:generate-model Post --fields="title:string,description:string:nullable,user_id:foreignId"

  Model name ................................................................................................................... Post
  Fields ................................................................... title:string, description:string:nullable, user_id:foreignId

Model and migration created successfully.

Would you like to generate relationships for this model? (yes/no) [no]:
> yes

Available relationship options:
1 => hasMany
2 => belongsTo
3 => hasOne
4 => belongsToMany

Select the relationships you want to generate for this model. You can specify multiple relationships by separating them with a comma.
> 1,2

Enter the related model for the 'hasMany' relationship:
> Comment

Enter the related model for the 'belongsTo' relationship:
> User

Relationships generated successfully.
```

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

[](#contributing)

Contributions, issues, and feature requests are welcome! Feel free to open an issue or create a pull request.

License
-------

[](#license)

This package is released under the [MIT License](https://opensource.org/licenses/MIT).

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity49

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

Unknown

Total

1

Last Release

1099d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7a61545d3e749019b5ae58160977437da6b0037203955060fb9829807e22c1b4?d=identicon)[abdallah-tah](/maintainers/abdallah-tah)

---

Top Contributors

[![AbdallahMohamedKAVX](https://avatars.githubusercontent.com/u/173705695?v=4)](https://github.com/AbdallahMohamedKAVX "AbdallahMohamedKAVX (2 commits)")[![Abdallah-Tah](https://avatars.githubusercontent.com/u/96321216?v=4)](https://github.com/Abdallah-Tah "Abdallah-Tah (2 commits)")[![giagara](https://avatars.githubusercontent.com/u/79515022?v=4)](https://github.com/giagara "giagara (1 commits)")

### Embed Badge

![Health badge](/badges/amohamed-laravelmodelmaker/health.svg)

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M683](/packages/barryvdh-laravel-ide-helper)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M157](/packages/orchestra-canvas)[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M210](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M858](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)

PHPackages © 2026

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