Hi there, I’m about to use LiveWire with a new Laravel project and I’ve hit a question: According to the screencasts I’m supposed to declare LiveWire components using php artisan make:livewire
, which is fine. However I was watching a tutorial by @iamkevinmckee (https://laracasts.com/series/multitenancy-in-practice/episodes/6) and he just manually creates a new Blade component and hooks in LiveWire functionality.
Is this allowed? Are there any functional differences between doing it this way?
Same goes for normal Blade Component actions. Blade components sit in the View/Components folder. They have a render()
function, just like LiveWire components.
However LiveWire components live in the Http/Components folder.
So can you use a normal Blade component (eg. public/views/components/input.blade.php
) in a LiveWire render()
method? (In other words, there’s nothing special about the Livewire/
vs Components/
directory in the views folder?)
Hope that all makes sense! It’s a bit rambling.