Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using query builder for adding fulltext index in Laravel

This is the query for adding fulltext index in MySQL:

ALTER TABLE `TableName`
ADD FULLTEXT INDEX `IndexName` (`ColumnName`);

But How can I use Laravel query builder to add fulltext index?

like image 694
Gatti Srinivas Avatar asked Mar 23 '16 09:03

Gatti Srinivas


1 Answers

This should do it: DB::statement

DB::statement('ALTER TABLE TableName ADD FULLTEXT INDEX IndexName (ColumnName)');

like image 103
Daan Avatar answered Nov 03 '22 02:11

Daan