Commit 644b3cb5 by 杨昕

test

parent ca92bafb
Pipeline #14110 passed with stages
in 4 minutes 14 seconds
......@@ -19,7 +19,7 @@ class MubanExport implements WithColumnWidths,WithHeadings,FromArray,WithStyles
{
return [
'#',
'视频名称',
'名称',
'媒资编号',
];
}
......@@ -41,7 +41,7 @@ class MubanExport implements WithColumnWidths,WithHeadings,FromArray,WithStyles
return [
[ "","【第一章马克思主义哲学是科学的世界观和方法论第一节哲学及其基本问题】.mp4", "mda-250f994a93f2688ba225532c641b2a34"],
[ "","【19课堂】2021.03.02-月半时政-脱贫攻坚-公基-李浩祥】.mp4", "mda-a4c0ad458d3592ff798277a42cb57be6"],
["","视频名称是必填项","媒资编号为必填项"]
["","视频名称是必填项","媒资编号为必填项"]
];
}
......
......@@ -282,11 +282,10 @@ class MediaController extends Controller
$file = $request->file('uploadFile');
#将文件内容转化为数组
$sheet = (new MediasImport())->toCollection($file);
$sheet = (new MediasImport())->toArray($file);
$media_ids = collect($sheet[0])->map(function ($item,$key){
return array_first($item);
})->toArray();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment