i need ask_id in mount() method,but it dont work…
public $ask_id;
public $products;
public $votes;
public $users;
protected $listeners = ['askAdd'];
public function askAdd(Ask $ask){
$this->ask_id=$ask->id;
}
public function mount(){
$this->products=Product::where('ask_id',$this->ask_id)->get();
$this->votes=Vote::where('ask_id',$this->ask_id)->get();
$this->users=User::all();
}