Shortcut to create new method that doesn't exist yet?
I've seen this used a number of times on Laracasts. You reference a method that does not exist such as `Post::doSomething($results)` and then you hit a hot key to generate the boilerplate for the method `doSomething` in the class `Post`.
How is this done? Other than constructors, getters, settings, etc I can't find this in the documentation.
Please sign in to leave a comment.
Hi there,
Press Alt+Enter while standing on problematic place and choose correct option from the newly appeared menu.
Excellent! Thanks!
Hi..
For me not work. There might be misunderstood, or Mac OS X differs command.
I put cursor over showTask (not exists this method) and press Alt+Enter. Nothing happens
Apreciate help.
Hi there,
https://www.jetbrains.com/help/phpstorm/2016.1/applying-intention-actions.html -- on top right there is a keymap switcher.
As I understand on Mac it would be Option+Enter. In any case -- you can reach the same menu by clicking on light bulb icon.
http://nedbatchelder.com/pix/macmenusymbols.png