'required|max:255|unique:users,name', 'email' => 'required|string|email|max:255|unique:users,email', 'password' => 'required|string|min:8|max:255|confirmed', ]; } public function render() { return view('livewire.user.form'); } public function store() { $validatedData = $this->validate(); User::create($validatedData); $this->dispatch('close-modal'); $this->dispatch('snackbar', ['message' => __('boilerplate::ui.create'), 'type' => 'success', 'icon' => 'fas fa-check']); $this->dispatch('userAdded'); $this->reset('name'); $this->reset('email'); $this->reset('password'); $this->reset('password_confirmation'); } }