gonoware / laravel-scout-database
Generic database driver for Laravel Scout.
Requires
- php: >=7.0
- laravel/scout: ^5.0
Requires (Dev)
- fzaninotto/faker: ~1.4
- mockery/mockery: ^1.0
- phpunit/phpunit: ~6.0
README
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
Copyright (c) 2018-present Go NoWare