📌  相关文章
📜  从一个组件到另一个组件的 livewire - PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:37.550000             🧑  作者: Mango

代码示例1
// component A
  public function functionCallComponentB(){
      $this->emit('callFunctionComponentB', 'optional_parameter');
  }

// component B
  public $listeners = [
      "callFunctionComponentB" => "functionReceiverCallFromComponentA"
  ];

  public function functionReceiverCallFromComponentA(){
      dd("called");
  }