change in cost calculation
This commit is contained in:
@@ -8,6 +8,7 @@ use Modules\CCMS\Models\Country;
|
||||
use Modules\CourseFinder\Models\Program;
|
||||
use Modules\CourseFinder\Models\ProgramLevel;
|
||||
use Modules\CostCalculator\Models\StayType;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
|
||||
// use Modules\CostCalculator\Database\Factories\CostCalculatorFactory;
|
||||
|
||||
@@ -30,16 +31,6 @@ class CostCalculator extends Model
|
||||
return $this->belongsTo(Country::class, 'country_id');
|
||||
}
|
||||
|
||||
public function programLevel()
|
||||
{
|
||||
return $this->belongsTo(ProgramLevel::class, 'programlevel_id');
|
||||
}
|
||||
|
||||
public function program()
|
||||
{
|
||||
return $this->belongsTo(Program::class, 'program_id');
|
||||
}
|
||||
|
||||
public function stayTypeLiving(): BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(StayType::class, 'living_costs', 'cost_calculator_id', 'stay_type_id')->withPivot('id', 'monthly', 'yearly')->withTimestamps();
|
||||
|
Reference in New Issue
Block a user