Call livewire component from dome module in base resourse view. #1767
Unanswered
Alexandr120
asked this question in
Q&A
Replies: 1 comment
-
For now I have removed RowComponent. base view (resourses\views\livewire\tables\index.blade.php)
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Good afternoon. I would like to know about the possibility of calling any livewire component from a module in laravel's base view. What I mean? For example, I have 2 simple modules that are responsible for 2 entities (for example, customers and employees). And for example, I have a Livewire component, let’s say TableIndex or just Index in these 2 modules.
These components are essentially absolutely identical. Regular table, regular filters.
In this case I would like to create an abstract component in the basic Laravel structure, say App/Livewire/Tables/AbstrcatIndex
In my practice of building tables using livewire, I came to the conclusion that I use this approach. I am creating a SomeTableComponent and SomeRow. Why do I use this approach, because for me this option is very convenient when working with filters. the table becomes dynamic.
Example
Livewire component in module
base view (resourses\views\livewire\tables\index.blade.php)
And proplem and the problem is here
in ducumentation of https://laravelmodules.com/docs/v10/livewire The documentation indicates how to render the component.
or I often use
In simple practice, without using a modular structure, I would call the render component like this
In this case, Livewire understands that all its components are located in the App\Livewire directory.
When you call to render a component inside a module, Livewire understands that all module components are located in the Modules\SomeModule\Livewire directory
in my opinion, a problem arises here that when creating such an abstract approach to constructing tables and rows as separate components, there is no way to call one or another modular row component in the abstract views directly in the underlying structure
How could this issue be resolved?
Beta Was this translation helpful? Give feedback.
All reactions