Answers for "livewire call function from other component"

PHP
0

livewire call function from other component

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

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

  public function functionReceiverCallFromComponentA(){
      dd("called");
  }
Posted by: Guest on January-12-2022

Code answers related to "livewire call function from other component"

Browse Popular Code Answers by Language