This sample application shows you how to use Laravel Scout's native integration with Typesense.
We use a sample dataset with 10K user records, show you how to search through the dataset.
Install composer dependencies
composer installCreate .env file
cp .env.example .envGenerate APP_KEY
php artisan key:generateStart Typesense:
export TYPESENSE_API_KEY=xyz
mkdir $(pwd)/typesense-data
docker run -p 8108:8108 \
-v$(pwd)/typesense-data:/data typesense/typesense:0.25.2 \
--data-dir /data \
--api-key=$TYPESENSE_API_KEY \
--enable-corsMigrate the databases and seed the testing data.
Create the database if not created in prompt. We use SQLite.
php artisan migrate --seedInstall node dependencies and build the frontend.
npm installnpm run buildphp artisan serveVisit http://127.0.0.1:8000 to see the app.
Read more about how to use Laravel Scout with Typesense here: https://laravel.com/docs/10.x/scout#typesense.