Commit 567a1b69 by 杨树贤

去除中间件

parent 4a0caec5
......@@ -20,7 +20,7 @@ class Kernel extends HttpKernel
\App\Http\Middleware\CheckForMaintenanceMode::class,
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
\App\Http\Middleware\TrimStrings::class,
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
// \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
];
/**
......
......@@ -16,9 +16,7 @@ class UserAddressService
$address['email'] = $user->email;
$address['phone'] = $user->phone;
}
if (empty($address['company_name'])) {
$address['company_name'] = '';
}
$address['user_id'] = $user->id;
$address['create_time'] = time();
//如果没有默认地址,那么就设置为默认地址
......@@ -35,9 +33,7 @@ class UserAddressService
public static function updateUserAddress($address, $user)
{
return DB::transaction(function () use ($address, $user) {
if (empty($address['company_name'])) {
$address['company_name'] = '';
}
if ($address['is_default']) {
UserAddressModel::where('user_id', $user->id)->update(['is_default' => 0]);
}
......
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