|
@@ -51,7 +51,8 @@ class PromotionController extends CatchController
|
|
return $query->where('promotions.created_at', '>=', $startTime);
|
|
return $query->where('promotions.created_at', '>=', $startTime);
|
|
})->when($endTime, function ($query, $endTime){
|
|
})->when($endTime, function ($query, $endTime){
|
|
return $query->where('promotions.created_at', '<=', $endTime);
|
|
return $query->where('promotions.created_at', '<=', $endTime);
|
|
- })->select('promotions.id', 'promotions.name', 'promotions.created_at',
|
|
|
|
|
|
+ })->orderBy('created_at', 'desc')
|
|
|
|
+ ->select('promotions.id', 'promotions.name', 'promotions.created_at',
|
|
'videos.name as video_name', 'promotions.series_sequence', 'promotions.callback_type',
|
|
'videos.name as video_name', 'promotions.series_sequence', 'promotions.callback_type',
|
|
'promotions.callback_config_id', 'promotions.video_id')
|
|
'promotions.callback_config_id', 'promotions.video_id')
|
|
->paginate($request->input('limit', 15));
|
|
->paginate($request->input('limit', 15));
|