plugin icon indicating copy to clipboard operation
plugin copied to clipboard

[Feature Request]: Allow custom components namespace outside `App\`

Open aguingand opened this issue 3 years ago • 1 comments

Feature Description

In Jigsaw you can use components by using the Components\ namespace (docs) but I found no way the configure this in laravel idea.

If I set Components in the "Blade components classes namespace(inside App)", the namespace is not discovered (due to the "inside App" thing I guess)

image

Proposals

Using the settings

Prevent using App\ root if the namespace is defined inside composer.json autoload "psr-4" section.

Using ide.json

Add "classNamespace" options in the schema, e.g:

"blade": {
    "components": {
        "viewPaths": [
            {
                "path": "source/_components",
                "classNamespace": "Components",
            }
        ]
    }
}

I think the ide.json proposal is better because it's more flexible.

aguingand avatar Sep 02 '22 10:09 aguingand

Hi. You can't setup Laravel Idea to correctly create components now. I'll try to add something. Thanks for posting.

adelf avatar Sep 07 '22 07:09 adelf