Simplify course search functionality and update route names for clarity
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user