PHPackages                             mazfreelance/laravel-command-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. [CLI &amp; Console](/categories/cli)
4. /
5. mazfreelance/laravel-command-generator

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

mazfreelance/laravel-command-generator
======================================

This is a simple package that includes some of custom Laravel artisan command into Laravel/Lumen.

v2.2.0(2y ago)239MITPHPPHP ^8.0

Since Jun 21Pushed 2y ago1 watchersCompare

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

READMEChangelog (1)Dependencies (7)Versions (7)Used By (0)

[![License](https://camo.githubusercontent.com/1b01ef0024ba0866c115986b895301f657c1b21fc29f05c4844b7f2e8d89204d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mazfreelance/laravel-command-generator)[![StyleCI](https://camo.githubusercontent.com/3ebb9759d3748ad0fa1b6c7f477c842a04b4bdc799f75a8b68f3c6d585d07be8/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f373534383938362f736869656c643f7374796c653d737175617265)](https://packagist.org/packages/mazfreelance/laravel-command-generator)[![Latest Version](https://camo.githubusercontent.com/6741679427333e0b40d777e054abb6b1cf63d96729f5c27d19c37cb90a5962cc/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7461672f6d617a667265656c616e63652f6c61726176656c2d636f6d6d616e642d67656e657261746f722e7376673f7374796c653d666c61742d737175617265266c6162656c3d72656c65617365)](https://github.com/mazfreelance/laravel-command-generator/tags)[![Total Downloads](https://camo.githubusercontent.com/8c330f11e7f69af7a1663258df28cbd045688e1fa0e016bd173e6e16f1de215a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d617a667265656c616e63652f6c61726176656c2d636f6d6d616e642d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mazfreelance/laravel-command-generator)[![Laravel Framework](https://camo.githubusercontent.com/28367be7a9084ff12c9baf0f0803907d34feb0dab9439a9d57771277df63fd90/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f657874656e73696f6e2d4c61726176656c5f4672616d65776f726b2d677265656e2e7376673f7374796c653d666c61742d737175617265)](#)

Laravel Command Generator
=========================

[](#laravel-command-generator)

This is a simple package that includes some of custom Laravel artisan command into Laravel/Lumen.

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

[](#installation)

Note: This repository now follows the Laravel/Lumen framework versioning. Use the appropriate version of this package for your Laravel/Lumen application.

You can install the package via composer:

```
composer require mazfreelance/laravel-command-generator
```

#### PHP7.x or below

[](#php7x-or-below)

```
composer require mazfreelance/laravel-command-generator=^1.0.0
```

Configuration
-------------

[](#configuration)

### Available Commands

[](#available-commands)

```
make:action         Create a new Action class
make:dto            Create a new Data Transfer Object class
```

#### Default Settings

[](#default-settings)

The default namespace for all command are `App\Actions\` and each name expects the filter classname to follow the `{$Name}Action` naming convention. Here is an example of action and data transfer objects based on the default naming convention.

ActionsData Transfer Object`App\Actions\UserFilter``App\DTO\UserFilter``App\Actions\PrivatePostFilter``App\DTO\PrivatePostFilter``App\Actions\GuestPostFilter``App\DTO\GuestPostFilter`#### Laravel

[](#laravel)

##### With Configuration File (Optional)

[](#with-configuration-file-optional)

> Registering the service provider will give you access to the `php artisan model:action {name}` command as well as allow you to publish the configuration file. Registering the service provider is not required and only needed if you want to change the default namespace or use the artisan command

After installing the Custom Command library, register the `Mazfreelance\LaravelCommandGenerator\ServiceProvider::class` in your `config/app.php` configuration file:

```
'providers' => [
    // Other service providers...

    Mazfreelance\LaravelCommandGenerator\ServiceProvider::class,
],
```

Copy the package config to your local config with the publish command:

```
php artisan vendor:publish --provider="Mazfreelance\LaravelCommandGenerator\ServiceProvider::class"
```

If install version 2.1.0 (Lumen can use this part if install [`mazfreelance/lumen-vendor-publish`](https://github.com/mazfreelance/lumen-vendor-publish)),

Optionally, You can publish the config file with:

```
# If install version 2.1.0
# Optionally, You can publish the config file with:
php artisan vendor:publish --provider="Spatie\LaravelData\LaravelDataServiceProvider" --tag="data-config"
```

In the `config/custom-command.php` config file. Set the namespace your model filters will reside in:

```
'namespace' => [
    'action' => 'App\\Actions\\',
    'dto' => 'App\\DTO\\',
]
```

#### Lumen

[](#lumen)

##### Register The Service Provider

[](#register-the-service-provider)

> This is only required if you want to use the `php artisan make:action|dto` command. [\#Avaiable Command](#available-commands)

In `bootstrap/app.php`:

```
$app->register(Mazfreelance\LaravelCommandGenerator\ServiceProvider::class);
```

```
// If install version 2.1.0,
$app->register(Spatie\LaravelData\LaravelDataServiceProvider::class);
```

##### Change The Default Namespace

[](#change-the-default-namespace)

In `bootstrap/app.php`:

```
config(['custom-command.action.namespace' => "App\\Actions\\"]);
config(['custom-command.dto.namespace' => "App\\DTO\\"]);
```

Change log
----------

[](#change-log)

Please see the [changelog](CHANGELOG.md) for more information on what has changed recently.

Other command for Lumen
-----------------------

[](#other-command-for-lumen)

- [Additional lumen command](https://github.com/raditzfarhan/lumen-command-generator)
- [Lumen Vendor Publish](https://github.com/mazfreelance/lumen-vendor-publish)

Credits
-------

[](#credits)

- [Mazfreelance](https://github.com/mazfreelance)

License
-------

[](#license)

MIT. Please see the [license file](LICENSE) for more information.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

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

Total

5

Last Release

1020d ago

Major Versions

v1.0.0 → v2.1.02022-06-21

PHP version history (2 changes)v1.0.0PHP ^7.2.5|^8.0

v2.0.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/2664199d6a3dadc2b99e49f463494d71556a1cea7d78e78abde761649d85aa06?d=identicon)[mazfreelance](/maintainers/mazfreelance)

---

Top Contributors

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

---

Tags

laravel-frameworklaravel-packagelumen-packagephpphp-extensionlaravelcommandcustom command

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mazfreelance-laravel-command-generator/health.svg)

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

###  Alternatives

[tucker-eric/eloquentfilter

An Eloquent way to filter Eloquent Models

1.8k4.8M26](/packages/tucker-eric-eloquentfilter)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[laravel-zero/framework

The Laravel Zero Framework.

3371.4M369](/packages/laravel-zero-framework)[nunomaduro/laravel-console-menu

Laravel Console Menu is an output method for your Laravel/Laravel Zero commands.

815412.0k48](/packages/nunomaduro-laravel-console-menu)[illuminated/console-mutex

Mutex for Laravel Console Commands.

146938.2k1](/packages/illuminated-console-mutex)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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