Toggle navigation
Toggle navigation
This project
Loading...
Sign in
OnePoem
/
OnePoem-Server
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
李帅
2022-03-24 15:03:46 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
33f401bf14aaeb8c66c22020def425d53e9fb84e
33f401bf
1 parent
49fdc0ce
1.feel 临境有感可以不填
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
7 deletions
app/Admin/Controllers/AdminMakeVideoController.php
app/Jobs/MakeVideo.php
database/migrations/2022_03_18_164757_create_admin_make_video_table.php
app/Admin/Controllers/AdminMakeVideoController.php
View file @
33f401b
...
...
@@ -13,6 +13,7 @@ use Dcat\Admin\Grid;
use
Dcat\Admin\Layout\Content
;
use
Dcat\Admin\Show
;
use
Dcat\Admin\Http\Controllers\AdminController
;
use
Illuminate\Support\Facades\Storage
;
class
AdminMakeVideoController
extends
AdminController
{
...
...
@@ -27,15 +28,17 @@ class AdminMakeVideoController extends AdminController
$grid
->
model
()
->
where
(
'user_id'
,
'='
,
1
);
$grid
->
column
(
'id'
)
->
sortable
();
$grid
->
column
(
'title'
);
$grid
->
column
(
'content'
);
$grid
->
column
(
'url'
)
->
image
();
$grid
->
column
(
'type'
);
$grid
->
column
(
'title'
,
'标题'
);
$grid
->
column
(
'content'
,
'有感'
);
$grid
->
column
(
'url'
)
->
display
(
function
(
$url
){
return
"<a target='_blank' href='"
.
Storage
::
disk
(
'public'
)
->
url
(
'/ffmpeg/'
.
basename
(
$url
))
.
"'>查看</a>"
;
});
$grid
->
column
(
'type'
,
'类型'
)
->
using
([
1
=>
'视频'
,
2
=>
'音频'
]);
$grid
->
column
(
'duration'
);
$grid
->
column
(
'size'
);
$grid
->
column
(
'poem_id'
);
$grid
->
column
(
'temp_id'
);
$grid
->
column
(
'thumbnail'
);
$grid
->
column
(
'thumbnail'
)
->
image
()
;
$grid
->
column
(
'bgm'
);
$grid
->
column
(
'created_at'
);
$grid
->
column
(
'updated_at'
)
->
sortable
();
...
...
app/Jobs/MakeVideo.php
View file @
33f401b
...
...
@@ -119,7 +119,7 @@ class MakeVideo implements ShouldQueue
Immerse
::
query
()
->
create
([
'user_id'
=>
1
,
'title'
=>
''
,
'content'
=>
$this
->
adminMakeVideo
->
feel
??
'-'
,
'content'
=>
$this
->
adminMakeVideo
->
feel
,
'url'
=>
$video2
,
'type'
=>
$this
->
adminMakeVideo
->
type
==
1
?
2
:
1
,
'duration'
=>
$video_info
[
'format'
][
'duration'
],
...
...
database/migrations/2022_03_18_164757_create_admin_make_video_table.php
View file @
33f401b
...
...
@@ -21,7 +21,7 @@ class CreateAdminMakeVideoTable extends Migration
$table
->
string
(
'images_url'
)
->
nullable
()
->
comment
(
'图片地址'
);
$table
->
unsignedTinyInteger
(
'bg_music'
)
->
comment
(
'是否背景音'
);
$table
->
string
(
'bgm_url'
)
->
nullable
()
->
comment
(
'背景音地址'
);
$table
->
string
(
'feel'
)
->
default
(
''
)
->
comment
(
'有感'
);
$table
->
text
(
'feel'
)
->
nullable
(
)
->
comment
(
'有感'
);
$table
->
string
(
'temp_id'
)
->
default
(
''
)
->
comment
(
'模板id'
);
$table
->
unsignedTinyInteger
(
'thumbnail'
)
->
comment
(
'封面图'
);
$table
->
string
(
'thumbnail_url'
)
->
nullable
()
->
comment
(
'封面图地址'
);
...
...
Please
register
or
login
to post a comment