Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
semour
/
semour_admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
39f507e5
authored
Nov 21, 2022
by
宁成龙
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
增加过滤
parent
7d080f56
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
app/Admin/Forms/User/EditUserHandle.php
app/Admin/Forms/User/EditUserHandle.php
View file @
39f507e5
...
...
@@ -28,8 +28,12 @@ class EditUserHandle extends Form implements LazyRenderable
// $userList = User::getListByIdArr($ids);
$userInfo
=
User
::
getInfoByUserId
(
$id
);
if
(
!
$userInfo
)
{
throw
new
\Exception
(
'客户不存在'
);
throw
new
\Exception
(
"Record not found"
);
}
$input
=
array_filter
(
$input
,
function
(
$value
)
{
return
$value
!==
null
;
});
User
::
updateById
(
$id
,
$input
);
return
$this
->
response
()
...
...
@@ -37,7 +41,7 @@ class EditUserHandle extends Form implements LazyRenderable
->
refresh
();
}
catch
(
\Throwable
$throwable
)
{
// var_dump((string)$throwable);
return
$this
->
response
()
->
error
(
trans
(
'admin.update_failed'
));
return
$this
->
response
()
->
error
(
trans
(
'admin.update_failed'
)
.
" :
{
$throwable
->
getMessage
()
}
"
);
}
}
...
...
@@ -50,7 +54,7 @@ class EditUserHandle extends Form implements LazyRenderable
$this
->
hidden
(
'id'
)
->
attribute
(
'id'
,
'id'
)
->
width
(
4
);
$this
->
row
(
function
(
Row
$form
)
{
$form
->
width
(
5
)
->
text
(
'company_name'
)
->
required
();
$form
->
width
(
5
)
->
text
(
'user_sn'
);
$form
->
width
(
5
)
->
text
(
'user_sn'
)
->
disable
()
;
});
$this
->
row
(
function
(
Row
$form
)
{
$form
->
width
(
5
)
->
text
(
'first_name'
)
->
required
();
...
...
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