### Install package with Composer Source: https://github.com/jeffersongoncalves/filament-check-whois-widget/blob/3.x/README.md Install the package via Composer. ```bash composer require jeffersongoncalves/filament-check-whois-widget ``` -------------------------------- ### Environment setup for CHECK_WHOIS_API_KEY Source: https://github.com/jeffersongoncalves/filament-check-whois-widget/blob/3.x/resources/boost/skills/check-whois-widget-development/SKILL.md Environment variable setup for the IP2WHOIS API key. Replace 'your-ip2whois-api-key' with a valid key obtained from IP2WHOIS. This key is used by the plugin's configuration. ```env CHECK_WHOIS_API_KEY=your-ip2whois-api-key ``` -------------------------------- ### Publish views (optional) Source: https://github.com/jeffersongoncalves/filament-check-whois-widget/blob/3.x/README.md Optionally publish the package views. ```bash php artisan vendor:publish --tag="filament-check-whois-widget-views" ``` -------------------------------- ### Run tests Source: https://github.com/jeffersongoncalves/filament-check-whois-widget/blob/3.x/README.md Run the package tests. ```bash composer test ``` -------------------------------- ### Multiple Domains with Layout Configuration Source: https://github.com/jeffersongoncalves/filament-check-whois-widget/blob/3.x/resources/boost/skills/check-whois-widget-development/SKILL.md Configures the plugin with multiple domains, sets the number of domains per row to 3, spans the widget full width, and sets a sort order of 5. ```php FilamentCheckWhoisWidgetPlugin::make() ->domains([ 'filamentphp.com', 'laravel.com', 'livewire.laravel.com', ]) ->setQuantityPerRow(3) ->setColumnSpan('full') ->setSort(5) ``` -------------------------------- ### Publish config file Source: https://github.com/jeffersongoncalves/filament-check-whois-widget/blob/3.x/README.md Publish the configuration file for the package. ```bash php artisan vendor:publish --tag="filament-check-whois-widget-config" ``` -------------------------------- ### Configure plugin options Source: https://github.com/jeffersongoncalves/filament-check-whois-widget/blob/3.x/README.md Optional configuration methods for the plugin. Defaults: show title true, quantity per row 1, column span '1/2'. ```php use JeffersonGoncalves\FilamentCheckWhoisWidget\FilamentCheckWhoisWidgetPlugin; FilamentCheckWhoisWidgetPlugin::make() ->domains([ 'filamentphp.com' ]) ->shouldShowTitle(false) // Optional show title default is: true ->setTitle('Whois') // Optional ->setDescription('Whois detail') // Optional ->setQuantityPerRow(1) //Optional quantity per row default is: 1 ->setColumnSpan('full') //Optional column span default is: '1/2' ->setSort(10) ``` -------------------------------- ### Register plugin in AdminPanelProvider Source: https://github.com/jeffersongoncalves/filament-check-whois-widget/blob/3.x/README.md Add the plugin to the AdminPanelProvider.php file. The domains method specifies which domains to check. ```php use JeffersonGoncalves\FilamentCheckWhoisWidget\FilamentCheckWhoisWidgetPlugin; ->plugins([ FilamentCheckWhoisWidgetPlugin::make() ->domains([ 'filamentphp.com' ]) ]) ``` -------------------------------- ### Basic Widget Registration with FilamentCheckWhoisWidgetPlugin Source: https://github.com/jeffersongoncalves/filament-check-whois-widget/blob/3.x/resources/boost/skills/check-whois-widget-development/SKILL.md Registers the plugin in a Filament panel and sets a single domain to query. Use this in the panel configuration method. ```php use JeffersonGoncalves\FilamentCheckWhoisWidget\FilamentCheckWhoisWidgetPlugin; public function panel(Panel $panel): Panel { return $panel ->plugins([ FilamentCheckWhoisWidgetPlugin::make() ->domains([ 'filamentphp.com', ]), ]); } ``` -------------------------------- ### Plugin configuration file (config/filament-check-whois-widget.php) Source: https://github.com/jeffersongoncalves/filament-check-whois-widget/blob/3.x/resources/boost/skills/check-whois-widget-development/SKILL.md Configuration file for the plugin. The 'ip2_whois_api_key' key reads the CHECK_WHOIS_API_KEY environment variable. Place this file in the config directory of your Laravel application. ```php // config/filament-check-whois-widget.php return [ 'ip2_whois_api_key' => env('CHECK_WHOIS_API_KEY'), ]; ``` -------------------------------- ### Custom Title and Description Source: https://github.com/jeffersongoncalves/filament-check-whois-widget/blob/3.x/resources/boost/skills/check-whois-widget-development/SKILL.md Shows the widget title (default true) and sets a custom title and description for the widget. The comment indicates the default for shouldShowTitle is true. ```php FilamentCheckWhoisWidgetPlugin::make() ->domains(['example.com']) ->shouldShowTitle(true) // default: true ->setTitle('Domain Monitor') ->setDescription('WHOIS registration details') ``` -------------------------------- ### Published config file Source: https://github.com/jeffersongoncalves/filament-check-whois-widget/blob/3.x/README.md Published config file content. The API key is read from the CHECK_WHOIS_API_KEY environment variable. ```php return [ 'ip2_whois_api_key' => env('CHECK_WHOIS_API_KEY'), ]; ``` -------------------------------- ### WHOIS Response Structure Source: https://github.com/jeffersongoncalves/filament-check-whois-widget/blob/3.x/resources/boost/skills/check-whois-widget-development/SKILL.md The structure of the cached WHOIS data entry, including domain, validity, dates, age, and favicon URL. Dates are Carbon instances, domain_age is in days, and favicon can be null. ```php [ 'domain' => 'example.com', 'is_valid' => true, 'create_date' => Carbon::instance, // Registration date 'update_date' => Carbon::instance, // Last update date 'expire_date' => Carbon::instance, // Expiry date 'domain_age' => 365, // Age in days 'favicon' => 'https://...', // Favicon URL or null ] ``` -------------------------------- ### Clear cached WHOIS data with Cache::forget Source: https://github.com/jeffersongoncalves/filament-check-whois-widget/blob/3.x/resources/boost/skills/check-whois-widget-development/SKILL.md Clears the cached WHOIS data for a specific domain. Use when stale data is displayed, as data is cached for 30 days. ```php Cache::forget('filament-check-whois-widget-example.com'); ``` -------------------------------- ### Hide Widget Title Source: https://github.com/jeffersongoncalves/filament-check-whois-widget/blob/3.x/resources/boost/skills/check-whois-widget-development/SKILL.md Disables the widget title by passing false to shouldShowTitle. ```php FilamentCheckWhoisWidgetPlugin::make() ->domains(['example.com']) ->shouldShowTitle(false) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.