Skip to content

Receita Federal Hack for LARAVEL to get CPF and CNPJ information

License

Notifications You must be signed in to change notification settings

douglasresendemaciel/receita-federal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Receita Federal Hack for LARAVEL to get CPF and CNPJ information

This library allow you get CPF and CNPJ from Receita Federal do Brasil.

Installation

Run the following command from you terminal:

composer require "douglasresendemaciel/receita-federal:@dev"

or add this to require section in your composer.json file:

"douglasresendemaciel/receita-federal"

then run composer update

Once it is installed, you need to register the service provider. Open up config/app.php and add the following to the providers key.

'providers' => [
...
DouglasResende\ReceitaFederal\ReceitaFederalServiceProvider::class
...

Rotes

For captcha route, selected the 'TYPE' of document = 'CPF' or 'CNPJ'

...
CAPTCHA ROUTE => route( 'receita-federal.captcha', ['document' => TYPE ] )

PROCESS ROUTE CNPJ => route( 'receita-federal.processCNPJ', ['cnpj' => number, 'captcha' => value ] )
PROCESS ROUTE CPF => route( 'receita-federal.processCPF', ['cpf' => number, 'captcha' => value, 'birthday' => 'd/m/Y' ] )
...

Usage

To show the captcha image, use img tag like <img src="{{ route( 'receita-federal.captcha', ['document' => TYPE ] ) }}" alt="captcha">

then post the form to be processed at the routes of PROCESS ROUTES

Author

Douglas Resende: http://www.douglasresende.com/

License

Thanks

Marcos Peli: (http://www.facebook.com/pelimarcos)

References

Code based on https://github.com/Massa191/Consultas_CNPJ_CPF_Receita_Federal For more information read the official documentation at https://laravel.com/docs/5.4/

About

Receita Federal Hack for LARAVEL to get CPF and CNPJ information

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages