Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
media-resource
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨昕
media-resource
Commits
644b3cb5
Commit
644b3cb5
authored
Apr 06, 2021
by
杨昕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
ca92bafb
Pipeline
#14110
passed with stages
in 4 minutes 14 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
MubanExport.php
app/Exports/MubanExport.php
+2
-2
MediaController.php
app/Http/Controllers/Web/MediaController.php
+1
-2
No files found.
app/Exports/MubanExport.php
View file @
644b3cb5
...
...
@@ -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"
],
[
""
,
"视频名称是
非
必填项"
,
"媒资编号为必填项"
]
[
""
,
"视频名称是必填项"
,
"媒资编号为必填项"
]
];
}
...
...
app/Http/Controllers/Web/MediaController.php
View file @
644b3cb5
...
...
@@ -282,11 +282,10 @@ class MediaController extends Controller
$file
=
$request
->
file
(
'uploadFile'
);
#将文件内容转化为数组
$sheet
=
(
new
MediasImport
())
->
to
Collection
(
$file
);
$sheet
=
(
new
MediasImport
())
->
to
Array
(
$file
);
$media_ids
=
collect
(
$sheet
[
0
])
->
map
(
function
(
$item
,
$key
){
return
array_first
(
$item
);
})
->
toArray
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment