### Install via Composer Source: https://github.com/jeffersongoncalves/laravel-clearbit/blob/main/README.md Install the package via Composer. ```bash composer require jeffersongoncalves/laravel-clearbit ``` -------------------------------- ### Run Tests Source: https://github.com/jeffersongoncalves/laravel-clearbit/blob/main/README.md Run the package test suite. ```bash composer test ``` -------------------------------- ### Clearbit Configuration Source: https://github.com/jeffersongoncalves/laravel-clearbit/blob/main/README.md Configuration file for the package. The API key is read from the CLEARBIT_API_KEY environment variable. ```php // config/clearbit.php return [ 'api_key' => env('CLEARBIT_API_KEY', ''), ]; ``` -------------------------------- ### Publish Config File Source: https://github.com/jeffersongoncalves/laravel-clearbit/blob/main/README.md Publish the package configuration file. ```bash php artisan vendor:publish --tag=clearbit-config ``` -------------------------------- ### Set API Key in .env Source: https://github.com/jeffersongoncalves/laravel-clearbit/blob/main/README.md Set the Clearbit API key in the .env file. Find the key under Settings > API in the Clearbit dashboard. ```env CLEARBIT_API_KEY=your-api-key ``` -------------------------------- ### Reveal by IP Source: https://github.com/jeffersongoncalves/laravel-clearbit/blob/main/README.md Identify a company from an IP address using the Reveal resource. ```php $company = Clearbit::reveal()->find('1.2.3.4'); ``` -------------------------------- ### Name to Domain Source: https://github.com/jeffersongoncalves/laravel-clearbit/blob/main/README.md Resolve a company name to its domain. The result contains a 'domain' key. ```php $result = Clearbit::nameToDomain()->find('Example Inc.'); // $result['domain'] ``` -------------------------------- ### Combined Lookup Source: https://github.com/jeffersongoncalves/laravel-clearbit/blob/main/README.md Perform a combined person and company lookup by email. The result contains 'person' and 'company' keys. ```php $combined = Clearbit::combined()->find('jane@example.com'); // $combined['person'], $combined['company'] ``` -------------------------------- ### Person Enrichment Source: https://github.com/jeffersongoncalves/laravel-clearbit/blob/main/README.md Enrich a person by email using the Person resource. ```php use JeffersonGoncalves\Clearbit\Facades\Clearbit; $person = Clearbit::person()->find('jane@example.com'); ``` -------------------------------- ### Company Enrichment Source: https://github.com/jeffersongoncalves/laravel-clearbit/blob/main/README.md Enrich a company by domain using the Company resource. ```php $company = Clearbit::company()->find('example.com'); ``` -------------------------------- ### Error Handling with ClearbitException Source: https://github.com/jeffersongoncalves/laravel-clearbit/blob/main/README.md Handle non-2xx API responses. ClearbitException exposes the decoded error body via errorBody(). Missing required criteria throw InvalidArgumentException before any HTTP call. ```php use JeffersonGoncalves\Clearbit\Exceptions\ClearbitException; try { Clearbit::person()->find('unknown@example.com'); } catch (ClearbitException $e) { logger()->error($e->getMessage(), $e->errorBody()); } ``` -------------------------------- ### Prospector Search Source: https://github.com/jeffersongoncalves/laravel-clearbit/blob/main/README.md Search for people at a company using the Prospector resource with filters for role, seniority, title, and pagination. ```php $people = Clearbit::prospector()->search('example.com', [ 'role' => 'engineering', 'seniority' => 'senior', 'title' => 'Engineer', 'page' => 1, 'page_size' => 10, ]); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.