1. Go to this page and download the library: Download andmarruda/laravel-ibge library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
use Andmarruda\LaravelIbge\Ibge;
use Andmarruda\LaravelIbge\Facades\Ibge as IbgeFacade;
$ibge = app(Ibge::class);
$pesquisas = $ibge->pesquisas();
$ocorrencias = $ibge->ocorrencias('CD');
$censo2010 = $ibge->ocorrencia('CD', 2010);
$metas = $ibge->metas(6);
$ficha = $ibge->fichaMetodologica('6-1-1');
$pesquisas = IbgeFacade::pesquisas();
use Illuminate\Support\Facades\Schedule;
Schedule::command('ibge:sync')
->monthly()
->withoutOverlapping();
use Andmarruda\LaravelIbge\Models\OdsIndicador;
use Andmarruda\LaravelIbge\Models\OdsMeta;
use Andmarruda\LaravelIbge\Models\Pesquisa;
use Andmarruda\LaravelIbge\Models\PesquisaOcorrencia;
$pesquisas = Pesquisa::with('ocorrencias')->get();
$indicadores = OdsIndicador::with('meta')->get();