Add Advanced Search and filtering to Posts
- Add full-text search index on posts.title and posts.body - Add search box with live filtering - Add filter dropdowns for type, status, and site - Add Clear Filters button - Display post count in filter bar - All filters work together (AND logic) Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('posts', function (Blueprint $table) {
|
||||
$table->fullText(['title', 'body']);
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('posts', function (Blueprint $table) {
|
||||
$table->dropFullText(['title', 'body']);
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user