PHPackages                             artchik/make-model-singular - 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. [CLI &amp; Console](/categories/cli)
4. /
5. artchik/make-model-singular

ActiveCommand[CLI &amp; Console](/categories/cli)

artchik/make-model-singular
===========================

Singular Table Name "Make Model" Artisan Command

1.0.3(6y ago)215.4k↓25%MITPHP

Since Apr 9Pushed 6y ago1 watchersCompare

[ Source](https://github.com/artchik/make-model-singular)[ Packagist](https://packagist.org/packages/artchik/make-model-singular)[ RSS](/packages/artchik-make-model-singular/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (5)Used By (0)

Laravel Singular Table Name "Make Model" Artisan Command
========================================================

[](#laravel-singular-table-name-make-model-artisan-command)

Problem
-------

[](#problem)

By default, Laravel assumes that the table names are in the plural. But, lets assume that we want to generate a model and a migration based on a singular table name. This is possible, but in three steps.

1. Generate the Model ```
    php artisan make:model Post
    ```
2. Tell the model that we'll be using the singular table name ```
    protected $table = 'post';
    ```
3. Generate the migration ```
    php artisan make:migration create_post_table --table=post
    ```

It would be nice to have a single command do all of the above.

Solution
--------

[](#solution)

*This package* will allow you run a single command to accomplish all three of these steps:

```
php artisan make:model-singular Post -m
```

You can utilize any of the regular **make:model** options, e.g.

```
php artisan make:model-singular Post -a
```

You can also specify a custom table if you wish:

```
php artisan make:model-singular Post --table=my_post
```

You can also specify a **sub-directory for a controller**:

```
php artisan make:model-singular Post --cdir=API
```

Installing
----------

[](#installing)

```
composer require artchik/make-model-singular --dev
```

License
-------

[](#license)

MIT

Acknowledgements
----------------

[](#acknowledgements)

- [Laravel Modding: Generating Models with singular table names by Peter Fox](https://medium.com/@SlyFireFox/laravel-modding-generating-models-with-singular-table-names-8c8f28589d6b)
- [Build Your Own Laravel Package in 10 Minutes Using Composer by Francis Macugay](https://medium.com/simplex-internet-blog/build-your-own-laravel-package-in-10-minutes-using-composer-867e8ef875dd)
- [Create and Publish a Laravel Package on Packagist by Samuel Ogundipe](https://pusher.com/tutorials/publish-laravel-packagist)

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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

Total

4

Last Release

2206d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1138995?v=4)[Artur Charukhchyan](/maintainers/artchik)[@artchik](https://github.com/artchik)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/artchik-make-model-singular/health.svg)

```
[![Health](https://phpackages.com/badges/artchik-make-model-singular/health.svg)](https://phpackages.com/packages/artchik-make-model-singular)
```

###  Alternatives

[wp-cli/wp-cli

WP-CLI framework

5.1k17.2M320](/packages/wp-cli-wp-cli)[consolidation/annotated-command

Initialize Symfony Console commands from annotated command class methods.

22569.8M19](/packages/consolidation-annotated-command)[seld/cli-prompt

Allows you to prompt for user input on the command line, and optionally hide the characters they type

24725.8M17](/packages/seld-cli-prompt)[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[php-tui/php-tui

Comprehensive TUI library heavily influenced by Ratatui

589747.0k6](/packages/php-tui-php-tui)[codedungeon/php-cli-colors

Liven up you PHP Console Apps with standard colors

10210.1M26](/packages/codedungeon-php-cli-colors)

PHPackages © 2026

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