laravel-idea / plugin

Laravel Idea plugin for PhpStorm
https://laravel-idea.com/
174 stars 7 forks source link

Enhancement proposals #52

Open miholeus opened 4 years ago

miholeus commented 4 years ago

Hi! First of all I'd like to thank the author for the plugin. There is a good plugin for Symfony, but there is no good for Laravel except yours. And I really miss some features.

  1. It would be nice to open a window explorer if you select directory in "Code Generation" settings. So I think it'll be good to place "...". Window explorer link1
  2. Create files (controllers, events, etc.) feature allows you to set file name only Create something link2 But I'd like to set directory right here. Check the default phpstorm or idea behavior when you create a class. Default IDEA dialog. link3 I can choose any directory and it's very convenient. Right now I do not have such option, and I need to change settings for a plugin everytime, it's tiresome and reduces my productivity. I think choosing a path for a file should be everywhere if you create some file. By default you can place value from "settings".
  3. Symfony plugin has a very cool feature "go to route" from an action inside a controller. Go to route link4 I really miss it here.
adelf commented 4 years ago

Hi. Thanks for the feedback! Something is wrong with images...

  1. Yes, it will be good. I'll try.
  2. The main idea was to create base folder(and namespace) in the settings. And then you can just set the class name with namespace. So, "Auth\LoginController" will be created in HTTP\Controllers\Auth\LoginController. And all these namespaces are conveniently completed in the class name dialog.
  3. You can click on method name, by Ctrl - mouse click, or by "Find usages" in this method and route will be found.
miholeus commented 4 years ago
  1. The problem is it's impossible to create files if you have a non-standard folder structure and multiple modules. So the only solution I see here is to provide the same window as IDEA has with custom folder selection.
  2. Yeah, I know about it, but I need to click on every method to find out the route. Symfony plugin shows you an icon identifying that route rule was created for that action. So the icon will not appear if you don't have a route. It's very convenient.

Something is wrong with images...

Don't know why they're missing. Click please on "link1,2,3,4", you'll see images

adelf commented 4 years ago
  1. What kind of structure do you have? It's much better to implement it's support instead of asking the folder each time when you create a class :)
miholeus commented 4 years ago

well, it's pretty complicated. I like how IDEA works, it substitutes the path in a window and gives you an option to change it if you want. So I thought it would be awesome if you implement it like this Look at directory. You can simply click "Enter" if you don't want to change the location.

adelf commented 4 years ago

Ok. Got it. I'll try to implement something... but not in the next version, which will be released next week. Current version has the Modules feature, when you have Module selector in each Code generation dialog. Currently modules are very basic - just a directories in root directory. I'm going to add a possibility to setup your own module structure, like list of modules with directories and root namesapces. Will it cover your needs? image

miholeus commented 4 years ago

@adelf if you give an option to set directory in that dialog window, then it will. If you want to add modules list with their directories in plugin's config, then I can also use it, I think..