Migration
Schema::create('comments', function (Blueprint $table) { $table->id(); $table->string('title'); $table->text('description'); $table->fullText(['title', 'description']);});
Natural language
Search for something
Comment::whereFulltext(['title', 'description'], 'something')->get();
Natural language with Query Expansion
Search for something and use the results to perform a larger query
Comment::whereFulltext(['title', 'description'], 'something', ['expanded' => true])->get();
Boolean mode
Search for something and exclude else
Comment::whereFulltext(['title', 'description'], '+something -else', ['mode' => 'boolean'])->get();
Tip given by @w3Nicolas
Enjoyed This Tip?
Get access to all premium tutorials, video and text courses, and exclusive Laravel resources. Join our community of 10,000+ developers.
Recent Courses
Laravel Coding with AI Agents: Cursor, Claude Code, Codex
5 lessons
1 h 01 min
PhpStorm Junie AI for Laravel Projects: Crash Course
7 lessons
36 min
NativePHP: Build Mobile App with Laravel
11 lessons
2 h 2 min read