laravel-enso / searchable
Global searchable registry for Laravel Enso
Requires
- laravel-enso/core: ^12.0
- laravel-enso/filters: ^3.0
- laravel-enso/migrator: ^2.1
- laravel-enso/permissions: ^5.0
- dev-master
- 2.7.2
- 2.7.1
- 2.7.0
- 2.6.0
- 2.5.1
- 2.5.0
- 2.4.0
- 2.3.0
- 2.2.0
- 2.1.2
- 2.1.1
- 2.1.0
- 2.0.1
- 2.0.0
- 1.3.5
- 1.3.4
- 1.3.3
- 1.3.2
- 1.3.1
- 1.3.0
- 1.2.9
- 1.2.8
- 1.2.7
- 1.2.6
- 1.2.5
- 1.2.4
- 1.2.3
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.4
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.19
- 1.0.18
- 1.0.17
- 1.0.16
- 1.0.15
- 1.0.14
- 1.0.13
- 1.0.12
- 1.0.11
- 1.0.10
- 1.0.9
- 1.0.8
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- dev-upgrade/laravel13-core12
- dev-feature/ensoV8
- dev-upgrade/enso6-dr
- dev-upgrade/enso6
- dev-upgrade/laravel8
- dev-fixes/stylci
- dev-hotfix/cleanupReadme
This package is auto-updated.
Last update: 2026-04-21 15:27:37 UTC
README
Description
Searchable provides the global command-palette style search registry used by Laravel Enso.
The package exposes a single search endpoint, a facade-backed registry for searchable models, and a finder service that resolves results according to configured attributes, scopes, permissions, and optional Scout providers.
It is intended for Enso applications that need cross-module quick search with permission-aware routes and grouped results.
Installation
Install the package:
composer require laravel-enso/searchable
Run the package migrations:
php artisan migrate
Optional publishes:
php artisan vendor:publish --tag=searchable-config php artisan vendor:publish --tag=searchable-factories
Features
- Global
api/core/searchable/indexendpoint. - Facade-backed searchable model registry.
- Finder service that supports local query matching or Scout search providers.
- Permission-filtered route actions based on the authenticated user's role.
- Support for route params, custom labels, scopes, permission groups, and nested relation attributes.
Usage
Register searchable models from any package by extending the package search service provider:
public $register = [ Product::class => [ 'group' => 'Product', 'attributes' => ['name', 'internal_code', 'part_number'], 'label' => 'internal_code', 'permissionGroup' => 'products', ], ];
The finder returns grouped results with resolved route params and only the route actions the current user is allowed to execute.
API
HTTP routes
GET api/core/searchable/index
Core services
LaravelEnso\\Searchable\\Services\\SearchLaravelEnso\\Searchable\\Services\\Finder
Behavior:
- stores registered searchable model definitions
- executes Scout search when
searchProvideris configured - otherwise executes filter-based database search
- filters available actions by role permissions
Depends On
Required Enso packages:
Contributions
are welcome. Pull requests are great, but issues are good too.
Thank you to all the people who already contributed to Enso!