feat: implement premium blog search and filter UI with improved layout and dynamic post loading.

This commit is contained in:
Ümit Tunç
2026-05-25 06:01:35 +03:00
parent a037917f16
commit afa92d8f4a
3 changed files with 232 additions and 36 deletions
+10
View File
@@ -42,6 +42,16 @@ class BlogController extends Controller
$query = $query->whereJsonContains('tags', $request->tag);
}
// Search filtresi
if ($query && $request->has('search') && $request->search) {
$search = $request->search;
$query = $query->where(function($q) use ($search) {
$q->where('title', 'like', '%' . $search . '%')
->orWhere('content', 'like', '%' . $search . '%')
->orWhere('excerpt', 'like', '%' . $search . '%');
});
}
$posts = $query
? $query->latest('published_at')->paginate(12)
: collect();