laravel-idea / plugin

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

Use laravel 7 stub #49

Closed henryavila closed 3 years ago

henryavila commented 4 years ago

Hi. When crating an Class with Larevel idea, would be great to use Laravel 7 stub. In my case, the model has some customizations that MUST be present in all new Models. The Laravel Stub solves this problem, but Laravel idea don't use this feature

adelf commented 4 years ago

Hi, Henry.

Laravel Idea uses internal PhpStorm's templates. You can configure it easily: image

henryavila commented 4 years ago

Hi @adelf, thanks for replying. Indeed this option exist, but I work in different computer/location for the same projects, So every change in the template, I have to do in all computer, and repeat this for every change.

The Laravel 7 stub allows me to always keep the templates sync. It's a improvement over the Local phpStorm code template.

adelf commented 4 years ago

Got it. PhpStorm templates can be saved to git also:

image

this will save all your templates in .idea/fileTemplates folder. Maybe it will help...

henryavila commented 4 years ago

Good to know. Thanks @adelf

adiletmaks commented 4 years ago

Hi, thank you for code templates, but I bet, it would be cool using stubs, or can you use stub as default template ?

Also, I wanted to ask can I make:model with migration, perfectly I want, ui code generation and make:model command were same.

adelf commented 4 years ago

I can't start to use Laravel 7 stubs. I need a more powerful template language. At least for #if operation, like here:

image

Also, I wanted to ask can I make:model with migration

Yes. This request is popular. It will be implemented soon.