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
d0e61bd1
authored
Nov 18, 2022
by
宁成龙
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修复user_sn不存在时的报错
parent
76c34743
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
app/Admin/Controllers/UserController.php
app/Admin/Controllers/UserController.php
View file @
d0e61bd1
...
@@ -79,14 +79,14 @@ class UserController extends AdminController
...
@@ -79,14 +79,14 @@ class UserController extends AdminController
try
{
try
{
$data
=
request
()
->
all
();
$data
=
request
()
->
all
();
$params
=
[
$params
=
[
'company_name'
=>
$data
[
'company_name'
],
'company_name'
=>
$data
[
'company_name'
]
??
""
,
'user_sn'
=>
$data
[
'user_sn'
],
'user_sn'
=>
$data
[
'user_sn'
]
??
""
,
'first_name'
=>
$data
[
'first_name'
],
'first_name'
=>
$data
[
'first_name'
]
??
""
,
'last_name'
=>
$data
[
'last_name'
],
'last_name'
=>
$data
[
'last_name'
]
??
""
,
'phone'
=>
$data
[
'phone'
],
'phone'
=>
$data
[
'phone'
]
??
""
,
'email'
=>
$data
[
'email'
],
'email'
=>
$data
[
'email'
]
??
""
,
'account_properties'
=>
$data
[
'account_properties'
],
'account_properties'
=>
$data
[
'account_properties'
]
??
""
,
'remark'
=>
$data
[
'remark'
],
'remark'
=>
$data
[
'remark'
]
??
""
,
'user_address_list'
=>
$data
[
'user_address_list'
]
??
[],
'user_address_list'
=>
$data
[
'user_address_list'
]
??
[],
];
];
...
@@ -116,8 +116,8 @@ class UserController extends AdminController
...
@@ -116,8 +116,8 @@ class UserController extends AdminController
}
catch
(
\Throwable
$throwable
)
{
}
catch
(
\Throwable
$throwable
)
{
// var_dump((string)$throwable);
// var_dump((string)$throwable);
return
Form
::
make
()
->
response
()
return
Form
::
make
()
->
response
()
->
error
(
trans
(
'admin.save_failed'
))
->
error
(
trans
(
'admin.save_failed'
))
->
withExceptionIf
(
$throwable
->
getMessage
(),
$throwable
);
->
withExceptionIf
(
$throwable
->
getMessage
(),
$throwable
);
}
}
$url
=
admin_url
(
"/users"
);
$url
=
admin_url
(
"/users"
);
return
Form
::
make
()
->
response
()
->
success
(
admin_trans
(
"succeeded"
))
->
redirect
(
$url
);
return
Form
::
make
()
->
response
()
->
success
(
admin_trans
(
"succeeded"
))
->
redirect
(
$url
);
...
...
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