plugin icon indicating copy to clipboard operation
plugin copied to clipboard

Generating Helper code not working on some Models

Open novakiller opened this issue 2 years ago • 3 comments

Hello, I'm not quite sure where to address this issue, but when attempting to generate new helper code in my project, it works for some models but not for others. We have some shared models located under the vendor/subfolder/models/ directory, and unfortunately, the helper code isn't generated for them. Could you please tell me how the plugin identifies the models for code generation? Additionally, is it possible to manually generate the code or modify the search path?

novakiller avatar Dec 06 '23 14:12 novakiller

Hello.

The only possible issue is if these models are in the "\Illuminate" namespace. Laravel Idea doesn't generate helper code for internal laravel models.

adelf avatar Dec 07 '23 00:12 adelf

Hi, thank you for your quick answer. They are in a different namespace than \Illuminate and after invalidating Caches and multiple restarts it kinda works but the helper which is linked to them only contains this:

namespace GeneaLabs\LaravelModelCaching {

use LaravelIdea\Helper\_BaseBuilder;

class EloquentBuilder extends _BaseBuilder {}

}

is this some kind of default builder?

novakiller avatar Dec 07 '23 06:12 novakiller

The helper code for these models is in another file. You're reading the "helper_model_builders" file. Models are in the"helper_models" file.

adelf avatar Dec 11 '23 13:12 adelf