ossycodes/laravel-scout-upstash-search

A Laravel Scout engine for Upstash Search

Maintainers

Package info

github.com/ossycodes/laravel-scout-upstash-search

pkg:composer/ossycodes/laravel-scout-upstash-search

Transparency log

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-08-07 19:20 UTC

This package is auto-updated.

Last update: 2026-08-08 08:07:48 UTC


README

A Laravel Scout driver for Upstash Search.

Installation

composer require laravel-upstash-search/laravel-scout-upstash-search

Configuration

Add your Upstash Search credentials to your .env:

UPSTASH_SEARCH_URL=https://your-search-url
UPSTASH_SEARCH_TOKEN=your-upstash-token

Publish the config file:

php artisan vendor:publish --provider="LaravelUpstashSearch\Scout\UpstashSearchServiceProvider" --tag="config"

Setup

Configure your model to use the Upstash driver:

use Laravel\Scout\Searchable;

class Post extends Model
{
    use Searchable;

    protected $searchableAs = 'posts';

    public function toSearchableArray()
    {
        return [
            'title' => $this->title,
            'body' => $this->body,
        ];
    }
}

Update config/scout.php:

'driver' => env('SCOUT_DRIVER', 'upstash'),

Usage

// Search
$results = Post::search('laravel')->get();

// Paginate
$results = Post::search('laravel')->paginate(15);

// Import all records
php artisan scout:upstash-import "App\Models\Post"

Documentation

For more information on Upstash Search, visit the Upstash Search Documentation.

License

MIT