Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

semour / semour_admin

  • This project
    • Loading...
  • Sign in
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 2 years ago by 宁成龙's avatar 宁成龙
Browse files
Options
  • _('Browse Files')
  • Download
  • Email Patches
  • Plain Diff

增加过滤

parent 7d080f56
Hide whitespace changes
Inline Side-by-side
Showing 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();
......
This diff is collapsed. Click to expand it.
  • Write
  • Preview
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment