From 2cfa7ae62f4130194375c85547d0f8b136acb907 Mon Sep 17 00:00:00 2001 From: weizong song Date: Thu, 13 May 2021 16:03:47 +0800 Subject: [PATCH] up --- app/Http/Controllers/Manager/TrainingController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Manager/TrainingController.php b/app/Http/Controllers/Manager/TrainingController.php index 64a95f7..aace1b9 100644 --- a/app/Http/Controllers/Manager/TrainingController.php +++ b/app/Http/Controllers/Manager/TrainingController.php @@ -39,7 +39,7 @@ class TrainingController extends CommonController $page_size = request()->page_size ? (int)request()->page_size : 3; $data = $data->with(["type" => function ($query) { $query->select("id", "name"); - }])->select("id", "type_id", "title", "poster", "video", "published_at")->orderBy("published_at","desc")->paginate($page_size); + }])->select("id", "type_id", "title", "poster", "video as video_stopped", "published_at")->orderBy("published_at","desc")->paginate($page_size); return response()->json($data->toArray()); } @@ -60,7 +60,7 @@ class TrainingController extends CommonController { $video = Training::with(["type" => function ($query) { $query->select("id", "name"); - }])->select("id", "type_id", "title", "poster", "video", "published_at")->find($id); + }])->select("id", "type_id", "title", "poster", "video as video_stopped", "published_at")->find($id); return response()->json($video->toArray()); }