|
|
@@ -89,7 +89,6 @@ class Rate extends Component
|
|
|
}
|
|
|
|
|
|
$this->course_subscriptions = \App\Models\CourseSubscription::select('*')->whereIn('id', $course_subscription_ids)->where('enabled', true)->get();
|
|
|
-
|
|
|
}
|
|
|
|
|
|
//$this->course_subscriptions = \App\Models\CourseSubscription::select('*')->where('enabled', true)->get();
|
|
|
@@ -264,17 +263,13 @@ class Rate extends Component
|
|
|
|
|
|
public function addDeleteMonth($m)
|
|
|
{
|
|
|
- if (!in_array($m, $this->months))
|
|
|
- {
|
|
|
+ if (!in_array($m, $this->months)) {
|
|
|
$this->months[] = $m;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- if (($key = array_search($m, $this->months)) !== false)
|
|
|
- {
|
|
|
- $this->months = array_slice($this->months, $key, 1);
|
|
|
+ } else {
|
|
|
+ if (($key = array_search($m, $this->months)) !== false) {
|
|
|
+ unset($this->months[$key]);
|
|
|
+ $this->months = array_values($this->months);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
}
|