muhammad-nawlo/filament-scout-manager

A comprehensive Filament plugin for managing Laravel Scout indexes and search settings

Fund package maintenance!
Muhammad-Nawlo

Installs: 11

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 0

Forks: 0

pkg:composer/muhammad-nawlo/filament-scout-manager


README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

A Filament plugin to manage your Laravel Scout search setup from an admin panel.

Features

  • Discover Scout-searchable models and inspect index/engine metadata.
  • Run index actions (import, flush, refresh) per model or in bulk.
  • View index health and popular searches with dashboard widgets.
  • Log user search queries for analysis.
  • Manage search synonyms in the panel.
  • Configure behavior with package config/settings.

Requirements

  • PHP 8.2+
  • Laravel app with Laravel Scout configured
  • Filament 5 panel

Installation

Install the package:

composer require muhammad-nawlo/filament-scout-manager

Run the installer:

php artisan filament-scout-manager:install

Or manually publish package files:

php artisan vendor:publish --tag="filament-scout-manager-config"
php artisan vendor:publish --tag="filament-scout-manager-migrations"
php artisan migrate

If you use a custom Filament theme, add the package views as a Tailwind source:

@source '../../../../vendor/muhammad-nawlo/filament-scout-manager/resources/**/*.blade.php';

Register the plugin

In your Filament panel provider, register the plugin:

use MuhammadNawlo\FilamentScoutManager\FilamentScoutManagerPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        // ...
        ->plugins([
            FilamentScoutManagerPlugin::make(),
        ]);
}

Configuration

Published config: config/filament-scout-manager.php

return [
    'log_searches' => true,
    'log_retention_days' => 30,
    'enable_synonyms' => true,
    'models' => [
        // 'App\\Other\\Model' => [],
    ],
];

Usage notes

  • Ensure each model you want indexed uses Scout's Searchable trait.
  • Configure your Scout driver (SCOUT_DRIVER) and engine credentials in .env.
  • The "Searchable Fields" options in the panel are most useful when your model defines a custom toSearchableArray().

Testing

composer test

Changelog

Please see CHANGELOG for recent updates.

Contributing

Please see CONTRIBUTING for details.

Security

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see LICENSE for details.