1
This commit is contained in:
@@ -69,7 +69,7 @@ class BrandTranslationModel extends Model
|
||||
static::saved(function ($model) {
|
||||
// 业务逻辑
|
||||
if($model->locale == 'en'){
|
||||
BrandModel::updateOrCreate(['id' => $model->id],['letter' => mb_substr($model->name, 0, 1, 'UTF-8')]);
|
||||
BrandModel::updateOrCreate(['id' => $model->brand_id],['letter' => mb_substr($model->name, 0, 1, 'UTF-8')]);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -167,7 +167,6 @@ class BrandService extends BaseService
|
||||
Db::beginTransaction();
|
||||
try {
|
||||
$info = $this->update($id, $params);
|
||||
log::info($info);
|
||||
if (!$info) {
|
||||
throw new BusinessException('提交失败');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user