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-04-24 11:50:39 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e5507d4afa7e2a0961242caff2830a9be774bbd3
e5507d4a
1 parent
23929fa9
1. 众妙接口新增一言内容
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
app/Models/Immerse.php
app/Models/Immerse.php
View file @
e5507d4
...
...
@@ -23,7 +23,7 @@ class Immerse extends Model
public
function
getUrlAttribute
(
$url
)
{
if
(
Str
::
contains
(
$url
,
'/storage/app/public/'
))
{
$str
=
Str
::
of
(
$url
)
->
replace
(
'/usr/local/nginx/html/OnePoem/
'
,
'
'
);
$str
=
Str
::
of
(
$url
)
->
replace
(
'/usr/local/nginx/html/OnePoem/
storage/app/public/'
,
'/storage/
'
);
return
Storage
::
disk
(
'public'
)
->
url
(
$str
);
}
else
{
return
$url
;
...
...
@@ -33,7 +33,7 @@ class Immerse extends Model
public
function
getThumbnailAttribute
(
$url
)
{
if
(
Str
::
contains
(
$url
,
'/storage/app/public/'
))
{
$str
=
Str
::
of
(
$url
)
->
replace
(
'/usr/local/nginx/html/OnePoem/'
,
''
);
$str
=
Str
::
of
(
$url
)
->
replace
(
'/usr/local/nginx/html/OnePoem/
storage/app/public/
'
,
''
);
return
Storage
::
disk
(
'public'
)
->
url
(
$str
);
}
else
{
return
$url
;
...
...
Please
register
or
login
to post a comment