PHP code example of illuma-law / healthcheck-typesense

1. Go to this page and download the library: Download illuma-law/healthcheck-typesense 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/ */

    

illuma-law / healthcheck-typesense example snippets


use IllumaLaw\HealthCheckTypesense\TypesenseCheck;
use Spatie\Health\Facades\Health;

Health::checks([
    TypesenseCheck::new(),
]);

TypesenseCheck::new()
    ->timeout(3)
    ->clientSettings([
        'api_key' => config('scout.typesense.api_key'),
        'nodes' => [[
            'host' => config('scout.typesense.host'),
            'port' => '8108',
            'protocol' => 'http',
        ]],
        'connection_timeout_seconds' => 2,
    ]);