Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵增煜
/
tzt-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
745d2b68
authored
Nov 19, 2024
by
lujunyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
返回图片
parent
d713a688
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
0 deletions
+56
-0
app/Models/PharmacyModel.php
+56
-0
No files found.
app/Models/PharmacyModel.php
View file @
745d2b68
...
@@ -5,6 +5,8 @@
...
@@ -5,6 +5,8 @@
use
Dcat\Admin\Traits\HasDateTimeFormatter
;
use
Dcat\Admin\Traits\HasDateTimeFormatter
;
use
Illuminate\Database\Eloquent\Model
;
use
Illuminate\Database\Eloquent\Model
;
use
Illuminate\Database\Eloquent\SoftDeletes
;
use
Illuminate\Database\Eloquent\SoftDeletes
;
use
Illuminate\Support\Facades\Storage
;
use
Illuminate\Support\Str
;
// 药店
// 药店
class
PharmacyModel
extends
Model
class
PharmacyModel
extends
Model
...
@@ -31,4 +33,58 @@ public function patient()
...
@@ -31,4 +33,58 @@ public function patient()
{
{
return
$this
->
hasMany
(
PatientModel
::
class
,
'patient_id'
,
'id'
);
return
$this
->
hasMany
(
PatientModel
::
class
,
'patient_id'
,
'id'
);
}
}
public
function
getDrugBizLicenseAttribute
(
$value
)
{
if
(
Str
::
contains
(
$value
,
'//'
))
{
return
$value
;
}
return
Storage
::
url
(
$value
);
}
public
function
getBusinessLicenseAttribute
(
$value
)
{
if
(
Str
::
contains
(
$value
,
'//'
))
{
return
$value
;
}
return
Storage
::
url
(
$value
);
}
public
function
getFoodBizLicenseAttribute
(
$value
)
{
if
(
Str
::
contains
(
$value
,
'//'
))
{
return
$value
;
}
return
Storage
::
url
(
$value
);
}
public
function
getMedDeviceBizLicenseAttribute
(
$value
)
{
if
(
Str
::
contains
(
$value
,
'//'
))
{
return
$value
;
}
return
Storage
::
url
(
$value
);
}
public
function
getDrugInfoServiceCertAttribute
(
$value
)
{
if
(
Str
::
contains
(
$value
,
'//'
))
{
return
$value
;
}
return
Storage
::
url
(
$value
);
}
public
function
getPrePackagedFoodAttribute
(
$value
)
{
if
(
Str
::
contains
(
$value
,
'//'
))
{
return
$value
;
}
return
Storage
::
url
(
$value
);
}
}
}
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