kashif/full-text-search
Composer 安装命令:
composer require kashif/full-text-search
包简介
full text search laravel package
README 文档
README
Getting Started
Install full text search via Composer
Note: If you do not have Composer yet, you can install it by following the instructions on https://getcomposer.org
Step 1. Install package
composer require kashif/full-text-search
after installing this package, include FullTextSearch Trail in your model so a scope is now available called 'search', then add folowing code in your model.
protected $searchable = [ 'title', 'name', 'email' ];
Then when you want to apply full text search on specific model, do something like below.
User::search('john')->get();
####Note: Full text search with fulltext indexing by make apply fields indexing. so you can add indexes like below.
ALTER TABLE`users` ADD FULLTEXT search(name, email);
After this full text search should work.
统计信息
- 总下载量: 6
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-07-06