I was trying to return a livewire component from the controller. Something like the code below
public function index(){
return livewire(LivewireComponent:class, [
'someParam' => $param;
]);
}
Is there any way to do so?
I was trying to return a livewire component from the controller. Something like the code below
public function index(){
return livewire(LivewireComponent:class, [
'someParam' => $param;
]);
}
Is there any way to do so?
In this scenario, you should probably use the full-page component routing, allowing you to forgo the needless controller function.
https://laravel-livewire.com/docs/2.x/rendering-components#page-components
Route::get('/foo', LivewireComponent::class);