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 install
Create .env file
cp .env.example .env
Generate APP_KEY
php artisan key:generate
Start 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-cors
Migrate the databases and seed the testing data.
Create the database if not created in prompt. We use SQLite.
php artisan migrate --seed
Install node dependencies and build the frontend.
npm install
npm run build
php artisan serve
Visit 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.