platformContentRepository = $platformContentRepository; } //平台内容列表 public function index(Request $request) { $validator = Validator::make($request->all(), [ 'id' => 'required|integer', ]); if ($validator->fails()) { return $this->jsonError($validator->errors()->first()); } $platformContent = $this->platformContentRepository->index($request->all()); if ($platformContent){ return $this->jsonSuccess($platformContent); }else { return $this->jsonError('没有找到相关平台内容'); } } }