|
@@ -54,7 +54,7 @@ class PromotionController extends CatchController
|
|
|
})->orderBy('created_at', 'desc')
|
|
|
->select('promotions.id', 'promotions.name', 'promotions.created_at',
|
|
|
'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', 'promotions.remark')
|
|
|
->paginate($request->input('limit', 15));
|
|
|
foreach ($result as $item) {
|
|
|
$item->series_sequence_name = '第'. $item->series_sequence . '集';
|
|
@@ -116,13 +116,15 @@ class PromotionController extends CatchController
|
|
|
$this->validate($request, [
|
|
|
'id' => 'required',
|
|
|
'callback_type' => 'required|in:1',
|
|
|
- 'callback_config_id' => 'required'
|
|
|
+ 'callback_config_id' => 'required',
|
|
|
+ 'remark' => 'nullable|string|max:140',
|
|
|
]);
|
|
|
DB::table('promotions')
|
|
|
->where(['id' => $request->input('id'), 'uid' => $this->getLoginUserId(), 'is_enabled' => 1])
|
|
|
->update([
|
|
|
'callback_type' => $request->input('callback_type'),
|
|
|
'callback_config_id' => $request->input('callback_config_id'),
|
|
|
+ 'remark' => $request->input('remark', ''),
|
|
|
'updated_at' => date('Y-m-d')
|
|
|
]);
|
|
|
return 'ok';
|