feat: Implement multi-step cost calculator with dynamic form handling and styling enhancements
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace Modules\CostCalculator\Services;
|
||||
|
||||
use Modules\CostCalculator\Models\CostCalculator;
|
||||
use Modules\CourseFinder\Models\Program;
|
||||
|
||||
class CostCalculatorService
|
||||
{
|
||||
@@ -13,20 +14,12 @@ class CostCalculatorService
|
||||
$query->where('country_id', $request->country_id);
|
||||
}
|
||||
|
||||
if ($request->filled('programlevel_id')) {
|
||||
$query->where("programlevel_id", $request->programlevel_id);
|
||||
if ($request->filled('stay_type_id')) {
|
||||
$query->where("stay_type_id", $request->stay_type_id);
|
||||
}
|
||||
|
||||
if ($request->filled('program_id')) {
|
||||
$query->where("program_id", $request->program_id);
|
||||
}
|
||||
|
||||
if ($request->filled('living_status_id')) {
|
||||
$query->where("living_status_id", $request->living_status_id);
|
||||
}
|
||||
|
||||
if ($request->filled('status')) {
|
||||
$query->where('status', $request->status);
|
||||
Program::where('status', 1)-> where('id', $request->program_id)->get();
|
||||
}
|
||||
|
||||
})->latest()->paginate(10)->withQueryString();
|
||||
|
Reference in New Issue
Block a user