PHPackages                             smonteromx/useful-artisan-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. smonteromx/useful-artisan-commands

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

smonteromx/useful-artisan-commands
==================================

A collection of useful Laravel Artisan commands for generating actions, DTOs, and more.

v1.5.0(1mo ago)06↓50%MITPHP ^8.2

Since Mar 30Compare

[ Source](https://github.com/smonteromx/useful-artisan-commands)[ Packagist](https://packagist.org/packages/smonteromx/useful-artisan-commands)[ RSS](/packages/smonteromx-useful-artisan-commands/feed)WikiDiscussions Synced 2w ago

READMEChangelog (6)Dependencies (5)Versions (7)Used By (0)

Useful Artisan Commands
=======================

[](#useful-artisan-commands)

A collection of handy Laravel Artisan commands for generating actions, DTOs, and configuring databases.

Requires **PHP 8.2+** and **Laravel 12 or 13**.

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

[](#installation)

```
composer require smonteromx/useful-artisan-commands --dev
```

Auto-discovery registers the commands automatically.

Automatic PostgreSQL Verification
---------------------------------

[](#automatic-postgresql-verification)

When the package is installed, it automatically listens for `migrate*` Artisan commands. For PostgreSQL connections, it verifies that:

- the configured database exists, creating it through a maintenance `postgres` connection when possible
- the configured migrations schema exists when `database.migrations.table` uses `schema.table` notation

This requires no application service provider setup while Laravel package auto-discovery is enabled. The verification also runs eagerly during unit tests so migration-backed test databases can be prepared before the test suite touches the connection.

If package discovery is disabled for this package, manually register `SMonteroMx\UsefulArtisanCommands\UsefulArtisanCommandsServiceProvider` in `bootstrap/providers.php`.

Commands
--------

[](#commands)

### `make:action`

[](#makeaction)

Generates an action class in `app/Actions/`. The `Action` suffix is auto-appended.

```
php artisan make:action CreateUser
# -> app/Actions/CreateUserAction.php

php artisan make:action Billing/ChargeInvoice
# -> app/Actions/Billing/ChargeInvoiceAction.php
```

OptionDescription`-d`, `--data`Also generate a matching DTO class`-f`, `--force`Overwrite if file already exists### `make:data`

[](#makedata)

Generates a `final readonly` DTO class in `app/Data/`. The `Data` suffix is auto-appended.

```
php artisan make:data CreateUser
# -> app/Data/CreateUserData.php
```

OptionDescription`-f`, `--force`Overwrite if file already exists### `app:config-db`

[](#appconfig-db)

Interactive prompt to configure PostgreSQL connection details in your `.env` file.

```
php artisan app:config-db
```

Prompts for host, port, database name, username, and password. Before saving, it shows a review table and lets you correct selected fields.

Customizing Stubs
-----------------

[](#customizing-stubs)

Publish the stubs to customize the generated file templates:

```
php artisan vendor:publish --tag=useful-artisan-commands-stubs
```

This copies `action.stub` and `data.stub` to your project's `stubs/` directory. The commands will use your local stubs over the package defaults.

License
-------

[](#license)

MIT

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance90

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

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

Recently: every ~11 days

Total

6

Last Release

46d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/34f9d70cb49c4e252c8893cf061bc7477a3e82ebaa718498cb9ea351ad719c3a?d=identicon)[smonteromx](/maintainers/smonteromx)

---

Tags

laravelartisandtoactionscommands

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/smonteromx-useful-artisan-commands/health.svg)

```
[![Health](https://phpackages.com/badges/smonteromx-useful-artisan-commands/health.svg)](https://phpackages.com/packages/smonteromx-useful-artisan-commands)
```

###  Alternatives

[laravel/ai

The official AI SDK for Laravel.

1.1k4.6M277](/packages/laravel-ai)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9872.4M142](/packages/roots-acorn)[illuminate/queue

The Illuminate Queue package.

20433.0M1.7k](/packages/illuminate-queue)[spatie/laravel-health

Monitor the health of a Laravel application

88212.7M180](/packages/spatie-laravel-health)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.4M352](/packages/psalm-plugin-laravel)[forjedio/inertia-table

Backend-driven dynamic tables for Laravel + Inertia.js

272.0k](/packages/forjedio-inertia-table)

PHPackages © 2026

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