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
8b46e869
authored
Nov 21, 2024
by
lujunyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
医药简码
parent
9131d414
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
3 deletions
+1
-3
app/Models/DrugModel.php
+1
-3
No files found.
app/Models/DrugModel.php
View file @
8b46e869
...
@@ -36,10 +36,8 @@ class DrugModel extends Model
...
@@ -36,10 +36,8 @@ class DrugModel extends Model
self
::
RX_FALSE
=>
'否'
,
self
::
RX_FALSE
=>
'否'
,
];
];
public
function
set
Nam
eAttribute
(
$value
)
public
function
set
Cod
eAttribute
(
$value
)
{
{
$this
->
attributes
[
'name'
]
=
$value
;
$pinyin
=
new
Pinyin
();
$pinyin
=
new
Pinyin
();
$abbr
=
$pinyin
->
abbr
(
$this
->
name
)
->
join
(
''
);
// 获取拼音首字母
$abbr
=
$pinyin
->
abbr
(
$this
->
name
)
->
join
(
''
);
// 获取拼音首字母
$this
->
attributes
[
'code'
]
=
strtoupper
(
$abbr
);
$this
->
attributes
[
'code'
]
=
strtoupper
(
$abbr
);
...
...
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