- How do I install worksome/company-info in a Laravel application?
- Install it with Composer using composer require worksome/company-info. The service provider is auto-discovered, so no manual registration is needed in a standard Laravel app. Publish the package config file with php artisan vendor:publish so you can set your provider credentials and defaults. After that you are ready to resolve the lookup service from the container and query a VAT number.
- Which company data providers does worksome/company-info support?
- The package ships with support for VIES, the EU-wide VAT validation service, and Virk, which exposes Norwegian Brønnøysund register data. Both are wrapped behind a unified API so the same call returns the same DTO shape regardless of source. That means you can query EU and Norwegian companies without writing separate integration code for each registry.
- Does worksome/company-info support Laravel 13?
- Yes. Version 1.5.0 added Laravel 13.x compatibility via a framework constraint bump. If you are still on Laravel 12 or earlier, run composer why-not worksome/company-info to confirm the current illuminate constraints still allow your framework line before upgrading. The changelog does not state whether older Laravel versions were dropped, so verify against the composer.json in the tag you plan to install.
- Can I swap or add my own company registry driver?
- The package is built around a driver abstraction that resolves a configured provider at runtime, which is what allows VIES and Virk to be used interchangeably. You can point the config at a different supported provider, or implement the provider contract and register your own for registries the package does not cover. Keep custom drivers inside your app code rather than forking the package so future updates stay straightforward.
- Should I cache company lookup results from VIES or Virk?
- Yes, caching is strongly recommended. Registry calls commonly take 200ms to 2 seconds, so uncached lookups in a request path will visibly hurt response times. Cache the mapped result with a sensible TTL and consider dispatching lookups to a queued job rather than calling the registry synchronously. Note that public registry records can include sole-trader personal data, so define a retention policy for anything you store or log.
- Does worksome/company-info work outside of Laravel or in plain PHP?
- It is designed as a Laravel package with a service provider, a publishable config file, and container bindings. There is no documented standalone usage path, so in a plain PHP project you would have to instantiate and wire the classes yourself and lose the configuration layer. If you need framework-agnostic VAT lookups, a direct client for the VIES SOAP API is usually a better fit.
- What data do the DTOs returned by worksome/company-info contain?
- Lookups return consistent DTOs covering the company name, address details, and registration information such as the VAT or organisation number. Because the shape is normalised across providers, you can map it once into your own models instead of branching per registry. Keep that mapping in your application layer so a future provider change stays a config decision rather than a refactor.
- How do I test code that calls worksome/company-info without hitting the real registry?
- The README does not document a built-in fake, so the safest approach is to depend on your own interface that wraps the package and bind a stub implementation in tests. That keeps your test suite fast and free of network calls to VIES or Virk. It also means swapping the underlying package later only touches one binding rather than every test.
- What happens when a VAT lookup fails or the registry is unavailable?
- The package is a thin client over third-party registries, so timeouts, rate limiting, and upstream outages are surfaced to your code rather than handled by the vendor. Plan for a not-found result as well as an error result, since an invalid or unregistered VAT number is a normal outcome rather than an exception. Wrap calls in a job with retries and backoff if lookups are part of a critical flow.
- Is worksome/company-info actively maintained and what are the alternatives?
- The 1.5.0 release added Laravel 13 support promptly, which is a good signal that the project is maintained and follows new framework majors. Before adopting, check the repository's open issues, PR responsiveness, and stated support policy for older Laravel versions. Alternatives include calling the VIES SOAP endpoint or the Brønnøysund API directly, or smaller single-provider VAT validation packages if you only ever need EU checks.