Path: app/Livewire/comments/index.php
<?php
namespace App\Livewire;
use Livewire\Component;
class Comment extends Component
{
public string $rawData;
}
Path: resources/views/livewire/comments/index.blade.php
<input type="text" placeholder="Please complete the information." name="rawData" >
<div id="showActionData">{{!! $data !!}}</div>
<button click="getMixData(rawData)">Click to get processed data</button>
Path: app/Livewire/data.php
<?php
namespace App\Livewire;
use Livewire\Component;
class Helpp extends Component
{
public function getMixData($rawData)
{
// Action
return $data; // html tag data
}
}
I aim to implement a feature where, upon clicking the button in the Comment component, the input data is transferred to the getMixData method of the Helpp component for processing. Subsequently, the processed data will be displayed within the Comment component itself.