'required', ]; public function mount() { $this->userId = auth()->user()->id; $this->name = auth()->user()->name; $this->email = auth()->user()->email; } public function submit() { try { $this->validate(); User::where('id', $this->userId)->update([ 'name' => $this->name, ]); } catch (\Throwable $error) { return generalErrorHandler($error, $this); } } }