1. Go to this page and download the library: Download tor2r/laravel-brreg-api 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 Tor2r\BrregApi\Facades\BrregApi;
// Fetch a single entity by organisation number
$entity = BrregApi::getByOrgnr('987654321');
// Search by name
$results = BrregApi::searchByName('Sesam');
// Limit the number of results
$results = BrregApi::searchByName('Sesam', 10);
// Fetch a single voluntary organisation
$org = BrregApi::voluntary()->getByOrgnr('987654321');
// Search voluntary organisations by name
$results = BrregApi::voluntary()->searchByName('Frivillig');