|string> */ public function rules(): array { $userId = $this->user()->id; return [ 'email' => [ 'required', 'string', 'email', 'max:100', Rule::unique('users', 'email')->ignore($userId), ], 'username' => [ 'required', 'string', 'max:20', 'alpha_dash', Rule::unique('users', 'username')->ignore($userId), ], 'full_name' => ['required', 'string', 'max:200'], 'phone_number' => ['nullable', 'string', 'max:20'], 'gender' => ['nullable', 'in:male,female'], 'birth_date' => ['nullable', 'date'], 'address' => ['nullable', 'string'], 'photo' => ['nullable', 'string', 'max:500'], ]; } public function attributes(): array { return [ 'email' => 'email', 'username' => 'username', 'full_name' => 'nama lengkap', 'phone_number' => 'nomor telepon', 'gender' => 'jenis kelamin', 'birth_date' => 'tanggal lahir', 'address' => 'alamat', 'photo' => 'foto profil', ]; } }