form fill and default of select tag is not working

here the default of the select tag is not working so i use mount to fill the form but there also not working
1 Reply
hello_world
hello_worldOP5mo ago
here is my mount fuction code public function mount() { $user = auth()->user()->id; $hasPosDeviceCookie = PosAssign::whereNull('deleted_at')->where('user_id', $user)->pluck('pos_devices_id'); $paymentGatewayName = count($hasPosDeviceCookie) != 0 ? 'Payment Terminals' : 'Auth.net'; $prefillData['payment_gateway_id'] = PaymentGateway::firstWhere('name', $paymentGatewayName)->id; $this->form->fill($prefillData); }
Want results from more Discord servers?
Add your server