weizong song 5 years ago
parent d586f86db3
commit 073bf1c527

@ -76,7 +76,7 @@ class PublicController extends Controller
$pageLength = request()->pageLength ? (int)request()->pageLength : 3;
$data = $data->with(["type" => function ($query) {
$query->select("id", "name");
}])->select("id", "type_id", "title", "poster", "video", "published_at")->orderBy("published_at")->paginate($pageLength);
}])->select("id", "type_id", "title", "poster", "video as video_stopped", "published_at")->orderBy("published_at")->paginate($pageLength);
return response()->json($data->toArray());
}
@ -97,7 +97,7 @@ class PublicController extends Controller
{
$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());
}

Loading…
Cancel
Save