PHPackages                             huang-yi/mysql-fulltext-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. huang-yi/mysql-fulltext-laravel

ActiveLibrary[Database &amp; ORM](/categories/database)

huang-yi/mysql-fulltext-laravel
===============================

Let Laravel elegantly create MySQL fulltext index.

1.0.0(9y ago)12121MITPHP

Since Jan 8Pushed 9y ago2 watchersCompare

[ Source](https://github.com/huang-yi/mysql-fulltext-laravel)[ Packagist](https://packagist.org/packages/huang-yi/mysql-fulltext-laravel)[ RSS](/packages/huang-yi-mysql-fulltext-laravel/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (2)Versions (4)Used By (0)

MySQL-Fulltext-Laravel
======================

[](#mysql-fulltext-laravel)

MySQL很早以前就已经支持fulltext索引了，但是Laravel的Schema并没有为此提供便捷的创建方法，该拓展包就是为了解决这一痛点的：让Laravel的数据迁移优雅地创建MySQL的fulltext索引。

版本
--

[](#版本)

由于目前只在Laravel5.3环境下测试过，所以暂时不支持其他版本，后续会更新。

FulltextLaravelPHP1.0.x5.3.\*&gt;=5.6.4安装
--

[](#安装)

方法一，直接使用`composer`安装：

```
$ composer require huang-yi/mysql-fulltext-laravel:1.0.*

```

方法二，在项目根目录的`composer.json`的`require`属性添加：

```
{
    "require": {
        "huang-yi/mysql-fulltext-laravel": "1.0.*"
    }
}

```

然后运行：

```
$ composer update

```

使用
--

[](#使用)

用`php artisan make:migration`命令生成迁移文件后，需要替换原有的Facade与Blueprint类。可参考以下代码：

```
