|
@@ -44,7 +44,8 @@ class CourseController extends Controller
|
|
$list = $list->paginate();
|
|
$list = $list->paginate();
|
|
|
|
|
|
foreach($list as $item) {
|
|
foreach($list as $item) {
|
|
- $item->end_date = Carbon::createFromTimestamp(strtotime($item->apply_date))->addDays($item->duration)->toDateString();
|
|
|
|
|
|
+// $item->end_date = Carbon::createFromTimestamp(strtotime($item->apply_date))->addDays($item->duration)->toDateString();
|
|
|
|
+ $item->end_date = $item->computeEndDate();
|
|
$now = Carbon::now()->toDateString();
|
|
$now = Carbon::now()->toDateString();
|
|
if($now > $item->end_date) {
|
|
if($now > $item->end_date) {
|
|
$item->remain_days = 0;
|
|
$item->remain_days = 0;
|