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-05-25 21:03:27 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ca68983cc03f7fc269ab8c76a3109c48872ec9b0
ca68983c
1 parent
a0b59f67
1.测试封面url
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
app/Models/Immerse.php
app/Models/Immerse.php
View file @
ca68983
...
...
@@ -34,6 +34,17 @@ class Immerse extends Model
return
Storage
::
disk
(
'public'
)
->
url
(
$url
);
}
public
function
getThumbnailAttribute
(
$url
)
{
if
(
Str
::
contains
(
$url
,
'//'
)
||
$url
==
''
)
return
$url
;
if
(
Str
::
contains
(
$url
,
'/storage/app/public/'
))
{
$str
=
Str
::
of
(
$url
)
->
replace
(
'/usr/local/nginx/html/OnePoem/storage/app/public/'
,
''
);
return
Storage
::
disk
(
'public'
)
->
url
(
$str
);
}
return
Storage
::
disk
(
'public'
)
->
url
(
$url
);
}
public
function
poem
()
{
...
...
Please
register
or
login
to post a comment