> ## Documentation Index
> Fetch the complete documentation index at: https://herd.laravel.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Typesense

# Set up Typesense for Laravel Scout

Typesense is a lightning-fast open source search engine for your application, working perfectly with [Laravel Scout](https://laravel.com/docs/11.x/scout). It allows you to add a search engine with great relevancy, typo correction, and more to your application by simply adding the `Searchable` Trait to a model.

Herd makes setting up a Typesense service super easy:

<Frame>
  <img alt="Screenshot of Typesense settings" src="https://mintcdn.com/herd/DeXoYubPfJnYhPtY/images/docs/setup-typesense.png?fit=max&auto=format&n=DeXoYubPfJnYhPtY&q=85&s=6b7debd8169c3ebfcfb5d569b3169fcd" width="1800" height="1102" data-path="images/docs/setup-typesense.png" />
</Frame>

## Connecting from your Laravel application

Like with all Herd services, you can configure the port as well as the service name of your Typesense instance and then add the following environment variables to your `.env` file.

```env theme={null}
SCOUT_DRIVER=typesense
TYPESENSE_API_KEY=LARAVEL-HERD
TYPESENSE_HOST=localhost
```

If you're using a different port, you can simply copy the connections details from the right side of the service settings. The Typesense detail view also gives you a quick access to the logs of the service.

<Frame>
  <img alt="Typesense settings" src="https://mintcdn.com/herd/DeXoYubPfJnYhPtY/images/docs/settings_services_typesense.png?fit=max&auto=format&n=DeXoYubPfJnYhPtY&q=85&s=5728acbd0db1ce3847e1c9a6f755101a" width="1800" height="1102" data-path="images/docs/settings_services_typesense.png" />
</Frame>

When using the Typesense with Laravel Scout you will need to install the Typesense PHP SDK via the Composer package manager:

```bash theme={null}
composer require typesense/typesense-php
```

You can find additional information about using Laravel Scout with Typesense in the [Laravel documentation](https://laravel.com/docs/11.x/scout#typesense)
