Download the PHP package lucasgiovanny/laravel-serpro-datavalid without Composer
On this page you can find all versions of the php package lucasgiovanny/laravel-serpro-datavalid. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download lucasgiovanny/laravel-serpro-datavalid
More information about lucasgiovanny/laravel-serpro-datavalid
Files in lucasgiovanny/laravel-serpro-datavalid
Package laravel-serpro-datavalid
Short Description Laravel package to easily use Serpro Datavalid API
License MIT
Informations about the package laravel-serpro-datavalid
Laravel Serpro Datavalid
This package makes it easy to use Serpro Datavalid API with Laravel framework.
Contents
-
Installation
- Usage
Installation
This package can be installed via composer:
composer require lucasgiovanny/laravel-serpro-datavalid
Usage
-
Add your credentials to
.env
file - To use this package, you just need to import the Person Facades.
Available methods
- Datavalid API Docs.
validateName
: Returns whether the name belongs to the CPF and its rate of assertiveness.validateGender
: Returns whether the CPF has this gender.isBrazilian
: Returns whether the person to whom this CPF belongs is Brazilian or not.validateParentsName
: Returns whether the parents name belongs to the CPF and its rate of assertiveness.isCPFRegular
: Returns if CPF is regular with Brazilian government.validatePhoto
: Returns if the person in the photo is the person that owns this CPF number.
rawValidation
Param | Type |
---|---|
cpf | string (required) |
answers | array (required) |
Example:
Please, see the Data Valid API docs for a list of all the propriety that can be checked.
validateName
Param | Type |
---|---|
cpf | string (required) |
name | string (required) |
getSimilarity | bool (default: false) |
Example:
validateGender
Param | Type |
---|---|
cpf | string (required) |
gender | string (required) |
Example:
isBrazilian
Param | Type |
---|---|
cpf | string (required) |
Example:
validateParentsName
Param | Type |
---|---|
cpf | string (required) |
parents | array (required) |
getSimilarity | bool (default: false) |
Example:
isCPFRegular
Param | Type |
---|---|
cpf | string (required) |
Example:
validatePhoto
Param | Type |
---|---|
cpf | string (required) |
photo | string (required) |
Example:
Changelog
Please see CHANGELOG for more information what has changed recently.
Testing
Test needs to be written. Feel free to collaborate.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Contributing
Please see CONTRIBUTING for details.
Credits
License
The MIT License (MIT). Please see License File for more information.