how can I use the livewire component in the controller?
$payment = Basket::where('id', $id)->first();
$orderCode = $payment['order_code'];
$transaction = Transaction::where('order_code', $orderCode)->first();
$data = [
$transaction,
Auth::guard('customer')->user()
];
// use livewire component
Notification::send(User::where('position', '=', [17, 19, 20])->get(), new CreditRequestNotification($data));
return view('user.payment.payment_kind', compact('payment', 'transaction'));
I want use livewire component in where that commented
it is wrong:
User::where('position', '=', [17, 19, 20])->get()
use:
User::whereIn('position', [17, 19, 20])->get()
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.