船舶更新
This commit is contained in:
@@ -196,6 +196,15 @@ class LocationController extends Crud
|
||||
$translatorService = new \app\service\TranslatorService();
|
||||
|
||||
foreach ($languages as $lang) {
|
||||
$locationModel = $translationModels[$lang];
|
||||
if(!empty($data['id'])){
|
||||
$location = $locationModel::find($data['id']);
|
||||
}else{
|
||||
$location = $locationModel;
|
||||
}
|
||||
unset($data['name']);
|
||||
$location->fill($data);
|
||||
$location->save();
|
||||
$translatorService->queue($data,$sourceLang,'location',$data['id']?:null,$lang);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user