laravel-blog
laravel-blog copied to clipboard
SQLite does not like full text index
As SQLite does not like the command to create fultext index, you could do something like this:
if (DB::connection()->getDriverName() !== 'sqlite') {
DB::connection(config('laravel-fulltext.db_connection'))->statement('ALTER TABLE laravel_fulltext ADD FULLTEXT fulltext_title(indexed_title)');
DB::connection(config('laravel-fulltext.db_connection'))->statement('ALTER TABLE laravel_fulltext ADD FULLTEXT fulltext_title_content(indexed_title, indexed_content)');
}