dydx / Laravel-5-Artisan

Laravel 5 Artisan Commands for Sublime Text 3
42 stars 15 forks source link

custom cmnd to run multiple ones in a row #7

Closed ctf0 closed 8 years ago

ctf0 commented 8 years ago

can we do something like that ? , the idea is that the user write the class name once and then the command create a 'model/controller/migration' files for him automatically.

the below is just a demo of the idea not an actual functional code, the $0 will be the class name you enter.

[
    {
        "caption": "Laravel Artisan: All",
        "command": "run_multiple_commands",
        "args": {
            "commands": [
                {
                    "command": "laravel5_artisan",
                    "args": {
                        "command": "make:model $0 --migration",
                        "fill_in": true,
                        "fill_in_lable": "Enter the model name"
                    }
                },
                {
                    "command": "laravel5_artisan",
                    "args": {
                        "command": "make:controller $0Controller",
                        "fill_in": true,
                        "fill_in_lable": "Enter the controller name"
                    }
                }
            ]
        }
    }
]
dydx commented 8 years ago

Not sure why I'm not getting these notifications! Sorry for the really late response time.

I'll definitely look into it; I do think it'd be a little nicer to chain commands together.

ctf0 commented 8 years ago

np, its all good, thanx :+1: