Here is my current migration:
class News extends Migration
{
public function up()
{
Schema::create('News', function (Blueprint $table) {
$table->increments('id');
$table->string('title');
$table->text('description');
$table->integer('user_id')->unsigned()->index();
$table->string('imgPath')->nullable();
$table->timestamps();
});
}
public function down()
{
Schema::drop('News');
}
}
Now I need to make a full text index on these columns separately: title
description
. So I'm looking for something like this: ->fulltext()
. But I don't find anything similar in the Laravel documentation.
Anyway,
- how can I make a full text index on a single column in migration? Like:
(title)
- Also for my information, how can I make a composite full text index on multiple columns in migration? Like:
(title, description)
Note: I want an intex that lets me search like this: . . . match(col) against('value')