gonoware/laravel-scout-database

Generic database driver for Laravel Scout.

v1.0.0 2018-10-09 09:00 UTC

This package is auto-updated.

Last update: 2024-10-16 19:19:25 UTC


README

GitLab Repository Laravel Version Latest Stable Version StyleCI License Total Downloads

Forked from github.com/boxed-code/laravel-scout-database

This is a basic database backed driver for Laravel Scout. It is intended for use during development to avoid the need to setup an elastic instance or agolia and instead uses your active database configuration.

Searchable model attributes are JSON encoded an placed in a text column for simplicity, the very primitive 'like' operator is used to perform queries. It is fully functional supporting additional where clauses, etc. The driver deliberately avoids using free text queries & indexes as these are somewhat provider specific and would prevent the goal of it being able to operate with any architecture.

This driver is zero configuration, requiring you to only add the service provider & run the migration.

Installation

This package can be installed through Composer.

composer require gonoware/laravel-scout-database

Laravel 5.5+ uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.

Then run the migrations via the console

php artisan migrate

Usage

When the installation is done set SCOUT_DRIVER='database' in your .env.

Now you can use Laravel Scout as described in the official documentation

https://laravel.com/docs/master/scout#indexing

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email em@gonoware.com instead of using the issue tracker.

Credits

License

MIT

Copyright (c) 2018-present Go NoWare

FOSSA Status