douglasresendemaciel / receita-federal
Get documents information from brazilian receita federal
Requires
This package is auto-updated.
Last update: 2025-02-09 14:37:49 UTC
README
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/