PHPackages                             geradrum/php-curp-generator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. geradrum/php-curp-generator

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

geradrum/php-curp-generator
===========================

CURP generator

0.1.3(1y ago)014MITPHPPHP &gt;=7.4

Since Oct 11Pushed 1y ago1 watchersCompare

[ Source](https://github.com/geradrum/php-curp-generator)[ Packagist](https://packagist.org/packages/geradrum/php-curp-generator)[ RSS](/packages/geradrum-php-curp-generator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (5)Used By (0)

PHP CURP Generator
==================

[](#php-curp-generator)

Overview
--------

[](#overview)

The `Curp` class is designed to generate a CURP (Clave Única de Registro de Población) in Mexico based on the provided personal information. This class validates the required fields and constructs the CURP accordingly.

Requirements
------------

[](#requirements)

The class requires the following fields in the input data array:

- `name`: First name of the individual.
- `lastname`: Last name of the individual.
- `maternal_lastname`: Maternal last name (optional).
- `birthdate`: Birthdate in the format `YYYY-MM-DD`.
- `entity`: Entity object containing the corresponding state or entity information.
- `gender`: Gender of the individual.

Example Usage
-------------

[](#example-usage)

To use the `Curp` class, you need to create an instance of it with the required data. Below is an example of how to instantiate the class and generate a CURP.

### Example

[](#example)

```
