diff --git a/Default.sublime-commands b/Default.sublime-commands index e888095..f965e09 100644 --- a/Default.sublime-commands +++ b/Default.sublime-commands @@ -1,4 +1,12 @@ [ + { + "caption": "Laravel Generate: Controller", + "command": "generate", + "args": { + "generate": "controller", + "fill_in": "Enter the name of the controller" + } + }, { "caption": "Laravel Generate: Model", "command": "generate", diff --git a/generate.py b/generate.py index 85b8549..8aee0ab 100644 --- a/generate.py +++ b/generate.py @@ -25,7 +25,7 @@ def run(self, *args, **kwargs): self.args = [self.php_path, os.path.join(self.PROJECT_PATH, 'artisan'), 'generate:%s' % self.command] if os.path.isfile("%s" % os.path.join(self.PROJECT_PATH, 'artisan')): - if self.command in ['model', 'seed', 'test', 'view', 'migration', 'resource', 'scaffold']: + if self.command in ['controller', 'model', 'seed', 'test', 'view', 'migration', 'resource', 'scaffold']: # call function to do the work self.window.show_input_panel(self.fill_in, '', self.call_artisan, None, None) else: