PHPackages                             hydreflab/laravel-make-me - 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. hydreflab/laravel-make-me

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

hydreflab/laravel-make-me
=========================

Extendable Interactive Make Command for Laravel

v1.0.0(8y ago)371.2k1MITPHPPHP &gt;=7.0

Since Feb 22Pushed 8y ago1 watchersCompare

[ Source](https://github.com/HydrefLab/laravel-make-me)[ Packagist](https://packagist.org/packages/hydreflab/laravel-make-me)[ RSS](/packages/hydreflab-laravel-make-me/feed)WikiDiscussions master Synced today

READMEChangelog (1)DependenciesVersions (3)Used By (0)

Extendable Interactive Make Command for Laravel
===============================================

[](#extendable-interactive-make-command-for-laravel)

**Make** your life easier with interactive make command!

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

[](#installation)

```
composer require hydreflab/laravel-make-me
```

### Laravel &gt;= 5.5

[](#laravel--55)

Package uses Laravel auto-discovery feature, so no service provider registration is needed.

### Laravel &lt;= 5.4

[](#laravel--54)

Manual service provider registration is required in `config/app.php`:

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

    HydrefLab\Laravel\Make\MakeServiceProvider::class,
]
```

*Note: PHP &gt;= 7.0 is required to run this package*

Usage
-----

[](#usage)

To use interactive make, just run:

```
php artisan make
```

After that, you'll be asked what kind of class do you want to generate. Then, you'll be asked a series of questions in order to prepare class that suits your needs.

Interactive make integrates all default Laravel generator commands.

If you want to check what's available, simply run:

```
php artisan make --list

```

Why
---

[](#why)

Laravel's Artisan is a great tool. Laravel's generators (make) commands are great tools. Quite often they have a lot of additional options available. However, without checking out the command's code or run command with `--help` option, it is a mystery what additional stuff particular command can do. That's why I created this interactive make command. Enjoy!

\[Edit\]: I recently noticed that there is a similar [package](https://github.com/laracademy/interactive-make) that also adds interactive make. Check that out, maybe it will suit you better.

Preview
-------

[](#preview)

[![Preview](preview.gif)](preview.gif)

Extendability
-------------

[](#extendability)

Quite often, as project advances, you end up in a situation that you're creating your own generator commands, your own *make:something*. It would be awesome if this new command could be included in the interactive make. Hey, that's possible.

To add custom (non-default) generator command to the interactive make:

- command has to have `public collectInputForInteractiveMake()` method implemented,
- `collectInputForInteractiveMake` method must return an array,
- command must extend `Illuminate\Console\Command` class (since it is make-like command, I recommend to extend `Illuminate\Console\GeneratorCommand`),
- command name must contain `make:` prefix, for example `make:awesome`.

Example:

```
