Simplify course search functionality and update route names for clarity

This commit is contained in:
2025-08-04 17:44:59 +05:45
parent afc7c61f86
commit 6772e269fb
6 changed files with 378 additions and 192 deletions

View File

@@ -23,7 +23,7 @@ class ProgramService
if ($request->filled('intake_id')) {
$intakeId = $request->intake_id;
$query->whereJsonContains('intake', $intakeId);
$query->whereJsonContains('intakes', $intakeId);
}
if ($request->filled('status')) {
@@ -32,14 +32,13 @@ class ProgramService
if ($request->filled('search')) {
$search = $request->search;
$query->where('keywords', 'like', "%{$search}%");
$query->where('title', 'like', "%{$search}%");
}
if ($request->filled('location')) {
$location = $request->location;
$query->where('location', 'like', "%{$location}%");
}
})->latest()->paginate(10)->withQueryString();
}