PHPackages                             invoate/console-commands - 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. invoate/console-commands

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

invoate/console-commands
========================

This is my package console-commands

1.0.1(3y ago)3147MITPHPPHP ^8.1

Since Feb 21Pushed 2y ago1 watchersCompare

[ Source](https://github.com/invoate/console-commands)[ Packagist](https://packagist.org/packages/invoate/console-commands)[ Docs](https://github.com/invoate/console-commands)[ RSS](/packages/invoate-console-commands/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (9)Versions (4)Used By (0)

Invoate Console Commands
========================

[](#invoate-console-commands)

[![Latest Version on Packagist](https://camo.githubusercontent.com/76fb3d2a6ae41ba82d5fd7d55f195188a5ef16d125d2740029324079d2f0010b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f696e766f6174652f636f6e736f6c652d636f6d6d616e64732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/invoate/console-commands)[![GitHub Tests Action Status](https://camo.githubusercontent.com/51595da1b0ec4f8666c920cdd6d2ea4b6d16d79c8297a67af1044483bef68eb6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f696e766f6174652f636f6e736f6c652d636f6d6d616e64732f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/invoate/console-commands/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/2c2a6e309061f8f9cb88043b950d43dcbf7f8e935ad6c62bde4cd02b4d94c787/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f696e766f6174652f636f6e736f6c652d636f6d6d616e64732f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/invoate/console-commands/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/61b7390336e23fdd3e017085b92fd92e42f30e933b545edec64d48222685a7b5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f696e766f6174652f636f6e736f6c652d636f6d6d616e64732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/invoate/console-commands)

These are a few console commands packaged together so they don't have to be recreated in new projects.

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

[](#installation)

You can install the package via composer:

```
composer require invoate/console-commands
```

Usage
-----

[](#usage)

### Pivot Make Command

[](#pivot-make-command)

The Pivot Make Command generates a migration for a pivot table. Table names can be passed in any order, the command will alphabetise them.

```
php artisan make:pivot table1 table2
```

The `table1` and `table2` arguments can be existing Eloquent models or table names. Table names for Eloquent models will be automatically resolved.

```
php artisan make:pivot User Team
```

```
Schema::create('teams_users', function (Blueprint $table) {
    $table->foreignId('team_id')->constrained();
    $table->foreignId('user_id')->constrained();
    //..
});
```

By default the command generates foreign keys, this can be disabled with the `--without-foreign-keys` flag.

```
php artisan make:pivot User Team --without-foreign-keys
```

```
Schema::create('teams_users', function (Blueprint $table) {
    $table->integer('team_id');
    $table->integer('user_id');
    //..
});
```

Timestamp columns are also generated by default, the `--without-timestamps` flag will disable these.

```
php artisan make:pivot User Team --without-timestamps
```

Additional columns can be created using the `--columns` flag, they must be formatted in the `column_name:column_type` format.

```
php artisan make:pivot User Team --columns string:role,timestamp:expires_at
```

```
Schema::create('teams_users', function (Blueprint $table) {
    //..
    $table->string('role');
    $table->timestamp('expires_at');
    //..
});
```

A pivot Eloquent model can be generated with the `--with-model` flag.

```
php artisan make:pivot User Team --model

# INFO  Migration [database/migrations/2023_02_20_153354_create_teams_users_table.php] created successfully.
# INFO  Model [app/Models/TeamUser.php] created successfully.
```

Optionaly an id column can be generated using the `--with-id` flag. By default this will generate a `$table->id()` column, passing another Laravel supported column type with e.g. `--id-type ulid` will change this.

```
php artisan make:pivot User Team --with-id --id-type ulid
```

```
Schema::create('teams_users', function (Blueprint $table) {
    $table->ulid();
    //..
});
```

If you do not wish to generate any columns for the pivot table you can use the `--without-columns` flag.

```
php artisan make:pivot User Team --without-columns
```

```
Schema::create('teams_users', function (Blueprint $table) {
    //
});
```

### Refresh

[](#refresh)

The `RefreshCommand` is a simple wrapper for `php artisan migrate:fresh --seed`.

```
php artisan refresh
```

Testing
-------

[](#testing)

```
composer test
```

Credits
-------

[](#credits)

- [Oliver Lumby](https://github.com/olumby)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

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

Total

2

Last Release

1213d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5b3408b396a9570668c003c8775fbc62a4d59e704d622994f9df00910d97a518?d=identicon)[OliverLumby](/maintainers/OliverLumby)

---

Top Contributors

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

---

Tags

laravellaravel-10laravel-consolelaravel-packagephpcliconsolelaravellaravel-packageproductivitydeveloper-toolsdevelopment-workflowinvoate

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/invoate-console-commands/health.svg)

```
[![Health](https://phpackages.com/badges/invoate-console-commands/health.svg)](https://phpackages.com/packages/invoate-console-commands)
```

###  Alternatives

[spatie/laravel-pdf

Create PDFs in Laravel apps

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

Automatic generation of API documentation for Laravel applications.

2.1k11.2M97](/packages/dedoc-scramble)[spatie/laravel-passkeys

Use passkeys in your Laravel app

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

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[harris21/laravel-fuse

Circuit breaker for Laravel queue jobs. Protect your workers from cascading failures.

44855.7k](/packages/harris21-laravel-fuse)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24857.5k](/packages/vormkracht10-laravel-mails)

PHPackages © 2026

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