- Getting Started
- The Basics
- Core Concepts
- Control Panel
- Streams API
- Front End Development
- Addon Development
The search system is integrated using Laravel Scout.
To begin indexing models you simply need to make the stream or model
Via Control Panel
You can mark streams as
searchable within the control panel in various areas.
When creating a stream via migration you can set
true to make the stream searchable.
You can use the Streams repository to fetch a stream instance, set it's
searchable attribute to
true and then
saving said stream instance.
use \Anomaly\Streams\Platform\Stream\Contract\StreamRepositoryInterface; $repository = app(StreamRepositoryInterface::class); $stream = $repository->findBySlugAndNamespace('vehicles', 'rvs'); $stream->searchable = true; $streams->save($stream);
In general indexing works exactly the same as it does in Scout.
You also have access to a few other methods of indexing.
Any time a searchable model is saved it will be synced automatically.
streams:index Artisan command will flush and re-index all or specific streams.