1. Go to this page and download the library: Download valsis/ro-company-lookup 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/ */
valsis / ro-company-lookup example snippets
use Valsis\RoCompanyLookup\Facades\RoCompanyLookup;
return RoCompanyLookup::summaryOrResult('RO12345678');
use Valsis\RoCompanyLookup\Facades\RoCompanyLookup;
$company = RoCompanyLookup::lookup('RO123456');
$company = RoCompanyLookup::lookup('123456', new DateTimeImmutable('2024-01-10'));
$result = RoCompanyLookup::tryLookup('RO123456');
if ($result->exists()) {
$company = $result->data;
}
$summary = RoCompanyLookup::summary('RO123456');
$summary = RoCompanyLookup::summaryOrNull('RO123456'); // null if not found
$summary = RoCompanyLookup::summaryOrFail('RO123456'); // throws on invalid / not found
$summary = RoCompanyLookup::summarySafe('RO123456'); // standard summary payload (never throws)
$summary = RoCompanyLookup::summaryOrResult('RO123456'); // same payload, with status/error metadata