{"id":14974460,"url":"https://github.com/hydreflab/laravel-make-me","last_synced_at":"2025-10-27T09:30:29.812Z","repository":{"id":56987446,"uuid":"122243030","full_name":"HydrefLab/laravel-make-me","owner":"HydrefLab","description":"Extendable Interactive Make Command for Laravel","archived":false,"fork":false,"pushed_at":"2018-03-27T09:17:50.000Z","size":162,"stargazers_count":37,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-01T04:31:40.273Z","etag":null,"topics":["cli","console","laravel","laravel5","make","php","php7"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HydrefLab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-20T19:10:08.000Z","updated_at":"2022-11-29T00:27:57.000Z","dependencies_parsed_at":"2022-08-21T09:40:27.601Z","dependency_job_id":null,"html_url":"https://github.com/HydrefLab/laravel-make-me","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HydrefLab%2Flaravel-make-me","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HydrefLab%2Flaravel-make-me/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HydrefLab%2Flaravel-make-me/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HydrefLab%2Flaravel-make-me/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HydrefLab","download_url":"https://codeload.github.com/HydrefLab/laravel-make-me/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238471956,"owners_count":19478134,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","console","laravel","laravel5","make","php","php7"],"created_at":"2024-09-24T13:50:35.804Z","updated_at":"2025-10-27T09:30:28.614Z","avatar_url":"https://github.com/HydrefLab.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Extendable Interactive Make Command for Laravel\n\n**Make** your life easier with interactive make command!\n\n## Installation\n\n```bash\ncomposer require hydreflab/laravel-make-me\n```\n\n### Laravel \u003e= 5.5\n\nPackage uses Laravel auto-discovery feature, so no service provider registration is needed.\n\n### Laravel \u003c= 5.4\n\nManual service provider registration is required in `config/app.php`:\n\n```bash\n'providers' =\u003e [\n    // ...\n    \n    HydrefLab\\Laravel\\Make\\MakeServiceProvider::class,\n]\n```\n\n*Note: PHP \u003e= 7.0 is required to run this package*\n\n## Usage\n\nTo use interactive make, just run:\n\n```bash\nphp artisan make\n```\n\nAfter that, you'll be asked what kind of class do you want to generate. Then, you'll be asked a \nseries of questions in order to prepare class that suits your needs.\n\nInteractive make integrates all default Laravel generator commands.\n\nIf you want to check what's available, simply run:\n\n```\nphp artisan make --list\n```\n\n## Why\n\nLaravel's Artisan is a great tool. Laravel's generators (make) commands are great tools. Quite \noften they have a lot of additional options available. However, without checking out the command's \ncode or run command with `--help` option, it is a mystery what additional stuff particular\ncommand can do. That's why I created this interactive make command. Enjoy!\n\n[Edit]: I recently noticed that there is a similar [package](https://github.com/laracademy/interactive-make) that also\nadds interactive make. Check that out, maybe it will suit you better.\n\n## Preview\n\n![Preview](preview.gif)\n\n## Extendability\n\nQuite often, as project advances, you end up in a situation that you're creating your own generator\ncommands, your own _make:something_. It would be awesome if this new command could be included\nin the interactive make. Hey, that's possible.\n\nTo add custom (non-default) generator command to the interactive make:\n* command has to have `public collectInputForInteractiveMake()` method implemented,\n* `collectInputForInteractiveMake` method must return an array,\n* command must extend `Illuminate\\Console\\Command` class (since it is make-like command, I recommend to extend `Illuminate\\Console\\GeneratorCommand`),\n* command name must contain `make:` prefix, for example `make:awesome`.\n\nExample:\n```php\n\u003c?php\n\nclass MyAwesomeMakeCommand extends \\Illuminate\\Console\\Command\n{\n    /**\n     * The console command name.\n     *\n     * @var string\n     */\n    protected $name = 'make:awesome';\n    \n\n    /**\n     * The console command description.\n     *\n     * @var string\n     */\n    protected $description = 'Create a new awesome class';\n    \n\n    /**\n     * Execute the console command.\n     *\n     * @return void\n     */\n    public function handle()\n    {\n        // Generate something awesome\n    }\n    \n    /**\n     * Get the console command arguments.\n     *\n     * @return array\n     */\n    protected function getArguments()\n    {\n        return [\n            ['name', InputArgument::REQUIRED, 'Your awesome name'],\n        ];\n    }\n    \n    /**\n     * Get the console command options.\n     *\n     * @return array\n     */\n    protected function getOptions()\n    {\n        return [\n            ['scale', 's', InputOption::VALUE_NONE, 'Awesomeness scale.'],\n        ];\n    }\n    \n    /**\n     * Collect options for the interactive make command.\n     * \n     * @return array\n     */\n    public function collectInputForInteractiveMake()\n    {\n        return [\n            'name' =\u003e $this-\u003eask('What is your name, awesome?'),\n            '-s' =\u003e $this-\u003eask('How awesome are you?', 10),\n        ];\n    }\n}\n```\n\nThat's it. `MyAwesomeMakeCommand` command will now be included in the interactive make as `awesome`.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhydreflab%2Flaravel-make-me","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhydreflab%2Flaravel-make-me","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhydreflab%2Flaravel-make-me/lists"}