29 lines
367 B
PHP
29 lines
367 B
PHP
<?php
|
|
|
|
namespace App\Livewire\Test;
|
|
|
|
use Livewire\Component;
|
|
|
|
class ChildComponent extends Component
|
|
{
|
|
|
|
public $id = 0;
|
|
|
|
public function mount($id)
|
|
{
|
|
$this->id = $id;
|
|
}
|
|
|
|
|
|
public function render()
|
|
{
|
|
return view('livewire.test.child-component');
|
|
}
|
|
|
|
|
|
public function doSome()
|
|
{
|
|
$this->dispatch('did');
|
|
}
|
|
}
|