From 87c9b955c3f4370ccb72a4bc8be884b1d7861095 Mon Sep 17 00:00:00 2001 From: Yoga Pangestu Date: Wed, 24 Sep 2025 20:02:23 +0700 Subject: [PATCH] refactor(login): menggunakanan trait WithUpdatedData --- app/Livewire/Auth/Login.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/Livewire/Auth/Login.php b/app/Livewire/Auth/Login.php index 2f2961d..aa68643 100644 --- a/app/Livewire/Auth/Login.php +++ b/app/Livewire/Auth/Login.php @@ -3,6 +3,7 @@ namespace App\Livewire\Auth; use App\Enums\UserStatus; +use App\Traits\WithUpdatedData; use Flux\Flux; use Livewire\Attributes\Layout; use Livewire\Attributes\Validate; @@ -13,6 +14,8 @@ ])] class Login extends Component { + use WithUpdatedData; + #[Validate(['required', 'string'], attribute: 'nama pengguna atau alamat surel')] public string $login = ''; @@ -58,11 +61,6 @@ public function auth() $this->redirectIntended('/studio/dashboard/overview', navigate: true); } - public function updated(string $prop, string $value) - { - $this->validateOnly($prop); - } - public function render() { return view('livewire.auth.login');