-
I don't really know if it's the right place for this question, but, how do I use Livewire with Lucid Architecture ? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 8 replies
-
Could you please provide more details on what exactly you would like to know? Since Lucid is simply to structure and run the code. I haven't had the chance to try Livewire myself but i intend to do so by the beginning of Dec. If you do try it please elaborate with more detailed questions here to be able to discuss further. |
Beta Was this translation helpful? Give feedback.
-
Okay, I see. All about Livewire is here. It comes directly with fresh Laravel 8.x projects (so does Jetstream and Fortify). In fact, when you create a Livewire component, it auto-generates 2 files App/Http/Livewire/{component-class} and resources/views/livewire/{component-view}. Also, a Livewire component does not rely on controllers to execute a feature, as it performs real time actions in the back and updates (in real time also) the view as per action. |
Beta Was this translation helpful? Give feedback.
-
The problem is with this default behavior of Livewire (about files auto-generation and auto-discovery). You know better than I that services in Lucid have their own tree-structure. Surely, if I place a Livewire component in one of my service, Livewire won't detect it. |
Beta Was this translation helpful? Give feedback.
-
@Mulkave can you help me implement Livewire with lucid :) |
Beta Was this translation helpful? Give feedback.
-
First, you need to publish the Livewire's configuration. Set class_namespace to Then run You can access your Livewire components like this |
Beta Was this translation helpful? Give feedback.
First, you need to publish the Livewire's configuration.
Set class_namespace to
App\\Services
, and view_path toapp_path('Services')
Then run
php artisan livewire:discover
to update components auto-discovery.You can access your Livewire components like this
<livewire:{service}.http.{component} />