Download the PHP package mgarcia96/laravel-scout-tntsearch-driver without Composer
On this page you can find all versions of the php package mgarcia96/laravel-scout-tntsearch-driver. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-scout-tntsearch-driver
TNTSearch Driver for Laravel Scout - Laravel 5.3/5.4
This package makes it easy to add full text search support to your models with Laravel 5.3/5.4.
Support us on Patreon
Contents
- Installation
- Usage
- Contributing
- Credits
- License
Installation
You can install the package via composer:
Add the service provider:
Ensure you have Laravel Scout as a provider too otherwise you will get an "unresolvable dependency" error
Add SCOUT_DRIVER=tntsearch
to your .env
file
Then you should publish scout.php
configuration file to your config directory
In your config/scout.php
add:
The asYouType
option can be set per model basis, see example bellow
Usage
After you have installed scout and the TNTSearch driver, you need to add the
Searchable
trait to your models that you want to make searchable. Additionaly,
define the fields you want to make searchable by defining the toSearchableArray
method on the model:
Then, sync the data with the search service like:
php artisan scout:import App\\Post
If you have a lot of records and want to speed it up you can run:
php artisan tntsearch:import App\\Post
After that you can search your models with:
Post::search('Bugs Bunny')->get();
Sponsors
Become a sponsor and get your logo on our README on Github with a link to your site. [Become a sponsor]
Credits
- Nenad Ticaric
- Sasa Tokic
- All Contributors
Contributors
This project exists thanks to all the people who contribute.
Backers
Thank you to all our backers! 🙏 [Become a backer]
Sponsors
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-scout-tntsearch-driver with dependencies
teamtnt/tntsearch Version 1.0.*
laravel/scout Version *
illuminate/bus Version ~5.4
illuminate/contracts Version ~5.4
illuminate/database Version ~5.4
illuminate/pagination Version ~5.4
illuminate/queue Version ~5.4
illuminate/support Version ~5.4