plugin icon indicating copy to clipboard operation
plugin copied to clipboard

[Feature Request]: Cannot Ctrl + Click on Custom livewire component

Open SupachaiTho opened this issue 3 years ago • 3 comments

Feature Description

https://stackoverflow.com/questions/74258656/phpstorm-does-not-recognize-livewire-custom-component

modules-livewire.php

'custom_modules' => [
        'Blog' => [
            'path' => base_path('modules/Blog/src'),
            'module_namespace' => 'Lazudi\\Blog',
             'namespace' => 'Livewire',
             'view' => 'Resources/views/livewire',
             'name_lower' => 'blog',
        ],
    ],

MainArticle.php

namespace Lazudi\Blog\Livewire\Share;

use Livewire\Component;

class MainArticle extends Component
{
...
}

something.blade

<livewire:blog::share.main-article />

Problem

I cannot Ctrl + Click on <livewire:blog::share.main-article /> to open the file MainArticle.php

Goal

Able to Ctrl + Click on every livewie components for example <livewire:blog::share.main-article />

SupachaiTho avatar Nov 01 '22 04:11 SupachaiTho

Laravel Idea doesn't run PHP code, so it can't find all Livewire components. It tries to find and analyze Livewire::component(...); calls, however if they look like Livewire::component($alias, $class); - this probably could not be "parsed". We are working on ide.json files where you will be able to register these paths and Laravel Idea will fetch these components, but it's still not ready.

adelf avatar Nov 01 '22 09:11 adelf

Copying Basti007's issue here, since it is the same.

Hi, there is already a support implemented for the nwidart Modules. If I want to use Livewire with the modules, I need to use an additional package https://github.com/mhmiton/laravel-modules-livewire.

Using this package, I have no auto completion in my blade files. Example: I write <livewire: and it should show livewire:basic::setup.stepper but nothing appears in the list.

adelf avatar Dec 04 '22 22:12 adelf

@adelf hello, where can we expect support for this?

LeMatosDeFuk avatar Sep 12 '23 12:09 LeMatosDeFuk