PHPackages                             stephenjude/extended-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. stephenjude/extended-artisan-commands

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

stephenjude/extended-artisan-commands
=====================================

Generate plain PHP files using artisan console commands.

3.0.3(3y ago)7114.1k1MITPHPPHP ^8.0

Since Jul 31Pushed 3y ago1 watchersCompare

[ Source](https://github.com/stephenjude/extended-artisan-commands)[ Packagist](https://packagist.org/packages/stephenjude/extended-artisan-commands)[ Docs](https://github.com/stephenjude/extended-artisan-commands)[ RSS](/packages/stephenjude-extended-artisan-commands/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (9)Dependencies (3)Versions (11)Used By (0)

Extended Artisan Commands
=========================

[](#extended-artisan-commands)

[![Latest Version on Packagist](https://camo.githubusercontent.com/b6d33b305e4b59ef29614b29538694bca510ee33714e33fdef7481fedd1a791f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7374657068656e6a7564652f657874656e6465642d6172746973616e2d636f6d6d616e64732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/stephenjude/extended-artisan-commands)[![Build Status](https://camo.githubusercontent.com/07426e03ce2267fe9507836bfce835d67005ff60a6bb07ae725506e6b3e900b7/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7374657068656e6a7564652f657874656e6465642d6172746973616e2d636f6d6d616e64732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/stephenjude/extended-artisan-commands)[![Total Downloads](https://camo.githubusercontent.com/b8cf95a1a97ecc116dff63b2166ce4ade9d29b4746394ad20f9c779f5e9a8f97/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7374657068656e6a7564652f657874656e6465642d6172746973616e2d636f6d6d616e64732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/stephenjude/extended-artisan-commands)

Have you ever enjoyed the assistance of artisan commands? This package brings more of it :)

You can now generate PHP classes and traits using artisan `make:class`, `make:interface`, `make:trait` or `make:abstract-class` console commands.

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

[](#installation)

### Step 1: Install Through Composer

[](#step-1-install-through-composer)

```
composer require stephenjude/extended-artisan-commands --dev
```

### Step 2: Run Artisan!

[](#step-2-run-artisan)

You're all set. Run php artisan from the console, and you'll see the new commands in the make:\* namespace section.

- make:interface
- make:class
- make:abstract-class
- make:trait
- make:enum

Usage
-----

[](#usage)

Here's a few other examples of commands that you might write:

```
php artisan make:class Services/EmailForwarderService
```

```
php artisan make:abstract-class Services/AbstractEmailForwarder
```

```
php artisan make:interface EmailForwarderContract
```

```
php artisan make:trait FileUpload
```

```
php artisan make:enum Permission
```

### Option for all the commands

[](#option-for-all-the-commands)

\--force This will overide the existing file, if it exist

### Options for the `make:class` command

[](#options-for-the-makeclass-command)

- `--interface` OR `-i` This will generate an interface for the generated class.
- `--trait` OR `-t` This will generate a trait for the generated class.
- `--abstract` OR `-c` This will generate an abstract class for the generated class.
- `--all` OR `-a` This will generate an interface, a trait and an abstract class for the generated class.

#### Example:

[](#example)

This will generate an interface for this class.

```
php artisan make:class Services/EmailForwarderService --interface
```

This will generate a trait for this class.

```
php artisan make:class Services/EmailForwarderService --trait
```

### Default Namespaces

[](#default-namespaces)

- All interfaces are generated under the `App/Contracts` namespace.
- All traits are generated under the `App/Traits` namespace.
- All enums are generated under the `App/Enums` namespace.
- Classes and abstract classes are generated under the `App` namespace.

Default namespaces can be configured inside the package config file.

Configurations
--------------

[](#configurations)

You can configure default namespace by publishing the package config file:

```
php artisan vendor:publish --provider="Stephenjude\ExtendedArtisanCommands\ExtendedArtisanCommandsServiceProvider" --tag="config"
```

### Configuring Default Namespace

[](#configuring-default-namespace)

```
return [
    /*
    |--------------------------------------------------------------------------
    | Default Class Namespace
    |--------------------------------------------------------------------------
    |
    | Here you can configure the default namespace for
    | the make:class command.
    |
    */

    'class_namespace' => '',

    /*
    |--------------------------------------------------------------------------
    | Default Abstract Class Namespace
    |--------------------------------------------------------------------------
    |
    | Here you can configure the default namespace for
    | the make:abstract-class command.
    |
    */

    'abstract_class_namespace' => '',

    /*
    |--------------------------------------------------------------------------
    | Default Interface Namespace
    |--------------------------------------------------------------------------
    |
    | Here you can configure the default namespace for
    | the make:interface command.
    |
    */

    'interface_namespace' => '\Contracts',

    /*
    |--------------------------------------------------------------------------
    | Default Trait Namespace
    |--------------------------------------------------------------------------
    |
    | Here you can configure the default namespace for
    | the make:trait command.
    |
    */

    'trait_namespace' => '\Traits',

        /*
    |--------------------------------------------------------------------------
    | Default Enum Namespace
    |--------------------------------------------------------------------------
    |
    | Here you can configure the default namespace for
    | the make:enum command.
    |
    */

    'enum_namespace' => '\Enums',
];
```

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

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

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Stephen Jude](https://github.com/stephenjude)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

Laravel Package Boilerplate
---------------------------

[](#laravel-package-boilerplate)

This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity66

Established project with proven stability

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

Recently: every ~21 days

Total

9

Last Release

1121d ago

Major Versions

1.3 → 3.0.02023-03-07

2.0.0 → 3.0.12023-06-01

PHP version history (3 changes)v1.0PHP ^7.2

1.3PHP ^7.2|^8.0

3.0.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/eb8b712638a0d72afbc4e21574989fdfc33717a69ea3070e92104183db8068f9?d=identicon)[stephenjude](/maintainers/stephenjude)

---

Top Contributors

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

---

Tags

stephenjudeextended-artisan-commands

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/stephenjude-extended-artisan-commands/health.svg)

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

###  Alternatives

[illuminate/console

The Illuminate Console package.

13045.3M6.2k](/packages/illuminate-console)

PHPackages © 2026

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