Commit d30d5d6b by lujunyi

添加店铺账号错误

parent 44d2a560
...@@ -131,9 +131,9 @@ protected function form() ...@@ -131,9 +131,9 @@ protected function form()
$role = Role::where('slug', 'pharmacy')->first(); $role = Role::where('slug', 'pharmacy')->first();
// 从表单模型获取手机号和其他信息 // 从表单模型获取手机号和其他信息
$mobile = $form->model()->mobile; $mobile = $form->mobile;
$name = $form->model()->name; $name = $form->name;
$pharmacyId = $form->model()->id; $pharmacyId = $form->getKey();
// 查找当前是否已有管理员 // 查找当前是否已有管理员
$admin = Administrator::where('pharmacy_id', $pharmacyId)->first(); $admin = Administrator::where('pharmacy_id', $pharmacyId)->first();
...@@ -159,7 +159,7 @@ protected function form() ...@@ -159,7 +159,7 @@ protected function form()
DB::commit(); DB::commit();
} catch (\Exception $e) { } catch (\Exception $e) {
DB::rollBack(); DB::rollBack();
throw new \Exception('创建或者更新店铺管理员错误~'); throw new \Exception($e->getMessage());
} }
}); });
......
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